Why? The blue whale is easily the biggest animal that has ever been known to exist on this planet, bar none, and it does just fine. Also, animals like elephants and rhinos are much bigger than many dinosaurs and other animals that went extinct at the same time.
The whale lives in the sea. It is able to take in vast amounts of air and stay submerged for a long time. It was much easier for this mammal to adapt, like us.
Elephants and Rhinos were not near the size of many of the largest dino's.
Also, all kinds of animals die out and become extinct for any number of reasons...
Check this out from wiki:
Physiology
With such a large body mass, combined with a long neck,
physiologists encounter problems determining how these animals managed to breathe.
Beginning with the assumption that
Apatosaurus, like
crocodilians, did not have a diaphragm, the dead-space volume (the amount of unused air remaining in the mouth, trachea, and air tubes after each breath) has been estimated at about 184 liters for a 30 ton specimen.
Its tidal volume (the amount of air moved in or out during a single breath) has been calculated based on the following
respiratory systems:
- 904 liters if avian
- 225 liters if mammalian
- 19 liters if reptilian
On this basis, its
respiratory system could not have been reptilian, as its tidal volume would not have been able to replace its dead-space volume. Likewise, the
mammalian system would only provide a fraction of new air on each breath. Therefore, it is assumed to have had either a system unknown in the modern world or one like
birds, i.e. multiple air sacs and a flow-through lung.