While it's obviously not a hard and fast law and I have gotten into arguments with people way above my pay grade over that:
https://en.wikipedia.org/wiki/Cope%27s_rule
not as an explanation of why whales are big, just a sort of interesting bit of related history.