Counter-intuitively, there is probably an evolutionary pressure for it.
Lambs (or calves or other herbivores) born into a storm may well perish before they get that all important first feed, so you’d think there would be evolutionary pressure against it. But as it is most definitely a thing, I’ve wondered about a few factors that could create an evolutionary pressure for it. The first and most obvious is that predators wouldn’t be very likely to pick up the scent of the birth fluids etc. The second is that any offspring which do survive such an arrival will clearly have good mobility at birth, and be fairly hardy to bad weather; the mother must have good mothering instincts and lots of good quality milk : all factors which improve survival rates no matter what the circumstances of your birth. In years when all the young are born into stormy weather, in a wild species, the only survivors will be those with these factors. In a domesticated situation, humans mitigate this of course, and nurture and rear a number of the youngsters which would otherwise have perished. “Fair weather mothers” will lose disproportionately more of their offspring when the weather is bad, so over time, the stronger will be the ones whose genes dominate. That’s my theory, anyway