Science behind the groundhog day myth
It is a myth. To say that it is unscientific is perhaps not the best phrasing, but Groundhog day isn't the most accurate prognostication method around. For something to be scientific, it needs to follow the scientific method. Given that Groundhog day follows the myth that:

A groundhog that sees it's shadow will become frightened, seeking shelter from the upcoming chill of 6 more weeks of winter, or
A groundhog that doesn't see it's shadow is certain that a chill is not on its way

, the implication derived from a poem being that nice weather now means bad weather later and vice-versa. Without defining 'winter' or 'spring' I question the testability of the hypothesis. In reality, astronomical spring occurs 6 weeks and 4 days after Groundhog day, making the distinction between the groundhog's &quot;definition&quot; of spring entirely subjective. But translating a subjective metric into an objective criteria, it is less accurate than the Farmer's Almanac of 50%.
If you want a more likely explanation on why a groundhog might behave the way it does, one need not look much farther than a picture from Punxsutawney, PA on groundhog day:

Given such a crowd, will an animal react more about the crowd or the upcoming weather? My guess is that if you saw such a crazed crowd show up to your house at 7:25 AM, you would want to crawl into a hole too. A groundhog must go into it's hole at some point, and I don't know of a part of the myth that says that the groundhog must immediately go back into its hole. Doing a groundhog day tradition with so much festivity, scientifically (not necessarily rationally though), be a contaminating factor to any sort of experiment. That is, even slight deviations in how such a thing is conducted (and given that groundhogs like Phil basically live like royalty in comparison to groundhogs in their natural state) make any rigorous evaluation of Phil's prognostication ability questionable.