February was the last month of Roman Calendar so it received the left days of year when 31,30,31,30.... days were given to each month.. February had 29 then august got 31 in honor of Augustus and February came down to 28.. that's why all have 31,30,31... except for July august which are adjacent and have 31 both.
There is no scientific logic about the name of months or number of days in each month. All that is related purely to Roman Mythology. The only logic is 1 revolution = 1 Roman Calendar year.
Earth takes 365days & 6hrs to complete one revolution around the sun so every fourth year it is 29days(366 days= 365days 6x4hrs) in February and rest years have 28 days.