Because the earth doesn't take exactly 365 days to orbit the sun...it takes about 365.25 days....so since the beginning of our Gregorian calender era (circa: 1582) it would throw the seasons off if we didn't account for it. Basically this is how it works: Every four years we add an extra day to February to keep in alignment with the "solar" year; which is how long it really takes the earth to orbit the sun.
However, if we did this every four years we would still screw it up so they devised some exceptions to the rule of four. Years that are divisible by 100 are not leap years, even if they are four years from the previous leap year unless the year is also divisible by 400. The years 1600 and 2000 were leap years but the years 1700, 1800 and 1900 were not. Follow? It's okay to be confused......the people who devised this genius plan were so confused that they had to skip 10 days in the month of October in the year 1582. It's true...nobody was born or died between Oct.5th, 1582 and Oct. 14th, 1582. Those days just don't exist.