the period for one revolution, namely one go-around of the Earth around the Sun completely, is 365 days and 6 hours, notice is the 3rd row in the table.
however, we in the west don't celebrate new year's day on the 1st of January at 6am, namely 365 days and 6 hours later, is celebrated at midnight on the 31st of december always, but based on that table, the revolution should be really at January 1st at 6am, but anyway.
so the calculations are done, cheesy as they are
year 1........................ 365 days and 6 hrs
year 2....................... 365 days and 6 hrs
year 3....................... 365 days and 6 hrs
year 4....................... 365 days and 6 hrs
so instead of making the revolution period 365 days and 6 hrs, the calendar makes it an even 365 days, and every 4 years, it adds up the remaining hours, 6+6+6+6 = 24, and 24 hours is one day, so, the 4th year ends up with all 6 hours gobbled up in 1 extra day, which is February 29th.