Why is it a school/shoal of fish, dolphins, porpoises and squids for example, but rather a pod/gam/herd/mob of whales?

Solution 1:

It seems that it was almost universally a school of whales until around 1930: see this Ngram; school is still used quite frequently. Note that pod is also currently used for dolphins.

I assume that the reason that school of whales is being replaced by pod of whales is that nowadays people are more aware of the fact that whales are not fish, and this wording emphasizes it. But an interesting questions remain: what is the origin of pod as a collective noun for dolphins and whales? The earliest usage I find in Google books is from 1836. In this reference, a pod of whales is a smaller subgroup within a school of whales.

And now the captain is in full chase of the school when, perceiving a pod of whales in the rear of the school, which seemed to lie more quiet than the main body, he bore down upon them with oar and sail.

And an 1837 reference explains the distinction more clearly,

Spermaceti Whales are gregarious, and are met with in what are called schools, or pods. The former consist of from twenty to fifty, being principally females with their young, guarded in the rear by a male of the largest size, who takes up a defensive position, and, when pursued by boats, urges the others to move quicker, by attacking them. A pod consists of eight or ten, generally young ones.

Solution 2:

As @Peter Shor says, school of whales was the standard form until recently. Quite possibly still is, though if the current trend continues pod will probably become the more common term very soon.

It's misleading to ask which form is "correct". There are many different types of whales - a group of killer whales (orca) is often called a pack, and sperm whales (their prey) still often come in herds.

In the age of wildlife documentaries, we're all far more accustomed to seeing marine life in its natural social groupings, so the non-specialist has much more reason to refer to them. Unlike seal-hunters, we don't like to refer to their livelihood as "herds", so "herd of seals" is declining.

As has often been pointed out here on ELU, there is no special committee for English telling us what words we should use, and where. The usage of "pod" has been widely adopted for the whole social group, although it originally meant a consistently-maintained sub-group within that whole. This doesn't make the new usage "wrong" - if enough of people say it, it's by definition acceptable.