I would argue that drowning is likely a pretty important form of selective pressure in the evolution of these animals. Marine mammals that are able to avoid predation and hunt for extended periods without surfacing would outcompete peers who lack those abilities. It's not hard to imagine incrementally larger lung capacities and incrementally better CO2 tolerances happening over millions of years and arriving at the current state.