Because the length of days and the calendar year are based around the rotation of the Earth and how long it takes the Earth to revolve around the Sun one time.  This takes approximately 365 days to do, or 365 rotations of the Earth.  But since those two measurements are not directly related, they are a bit unequal.