Here's why it's not just 365 days:
* Earth's orbit is elliptical: The Earth's orbit around the sun isn't perfectly circular. It's slightly elliptical, meaning Earth's speed varies as it orbits.
* Earth and Sun are both moving: While Earth orbits the Sun, the Sun is also moving within the Milky Way galaxy.
Therefore, the synodic period (365.256 days) is slightly longer than the sidereal period (365.242 days), which is the time it takes for Earth to complete one full rotation around the Sun relative to a fixed star.
This difference is why we have leap years to account for the extra quarter day.