Why do We have Leap Years?

Well, the original calendar of 365 days are supposed to match up with the solar calendar, which is the time it takes earth to orbit around the sun, BUT it actually takes the earth 365 1/4 days, so every four years, we have to catch up.