Dolphins live near coral reefs, but they do not live in coral reefs. Dolphins, like all other ocean species, benefit from a robust coral reef ecosystem, because reef inhabitants maintain the balance of nutrients that helps to normalize water quality.
When coral reefs fail to thrive and produce a vigorous, chemical-free environment, toxicity affects the entire food chain. The poisons from failed reef plants pass on to the fish that eat those plants, and then the poisons pass on to the predators who eat the affected fish. Many dolphin populations live and hunt around coral reefs, so a decline in hearty food sources reduces the amount of prey available and threatens the dolphin population as well.