Here's why:
* Streamlined body: Dolphins have streamlined bodies for efficient movement through water. Having nostrils on top of their heads keeps them out of the way of the water flow, minimizing resistance.
* Surface breathing: Dolphins are mammals and need to breathe air. They can't breathe underwater like fish. Having blowholes on top allows them to surface quickly and easily to take a breath without having to turn their whole body.
* Sight while breathing: With their blowholes on top, dolphins can keep their eyes above water while breathing, allowing them to stay alert for predators and prey.
Essentially, the placement of their blowholes is a perfect adaptation for a life spent swimming and surfacing for air.