The Roman calendar had 10 months till the reign of Numa Pompilius. He added 2 more months to sync it better and those months were January and February.
Roman had a notion that the even numbers were unlucky so all the months with 30 days were reduced by 1 day to make them 29 but the addition of all months summed to 354 which was even.
To change it and avoid whole year to be unlucky, he ordered and got 1 day removed from the new month February. and that is how February has 28 days.