Earth takes about 365.25 days to orbit the sun. To account for that extra quarter day, we add a day every four years - February 29.
Why Exceptions?
Century years aren't leap years unless divisible by 400. This keeps our calendar aligned with the seasons over time.