If we are to make a structure where the solar months of the year are grouped in pairs, similar to the way we must group together months in two in order to reach a whole number (59), then it seems reasonable to start by assuming that two solar months equals 61 days.
Six such 61-day-periods amounts to 366 days or one day too much. This problem could be solved for example by letting the last double-month have 60 days, but that is not a beautiful solution.
In our own almanac we can imagine 4 double-months with 30 + 31 = 61 days: March+April, May+June, August+September, October+November. July then does not fit in, having 31 days in spite of also August having 31 days. And we can see the same pattern in December, having 31 days in spite of January also having 31 days. February is a special case with only 28 days (in an ordinary year).
I believe the explanation for February is an attempt to coordinate our calendar with the four cardinal points (equinoxes and solstices). These give the following restrictions:
Though then we reach 366 instead of 365. As the seasons must be mirrored when we are south of the equator I have added the south version below. In the north hemisphere 'winter' is the shortest season, which in a way explains the length of February.