Originally February had 30 days, along with all the other months. (The 5 or 6 remaining days at various times were either extra days which didn't belong to a month or were omitted until there was a month's worth of them to catch up on.)
February got shorter because (being the last month of the year) it had days removed in order to add them to other months -- what was originally February 30th (the end of the year) became February 23rd (the end of the year, after which the leap day is inserted).