Although marine biologists have paid recent attention to the endangered species of whales, they have not conducted enough research to know exactly why whales breach. Breaching occurs when a whale, especially a humpback, flips itself entirely out of the water, twists in midair, and lands loudly on its side. Tourists on whale-watching tours may think the cavorting mammals breach just to create photogenic moments, but it probably has more to do with communication, comfort, defense, or predatory behavior.
One theory hypothesizes that whales breach as an alternative method of communication, instead of their underwater sonar noises. The smack can probably be heard by other whales for a very long distance. Yet what whales are saying to each other can only be guessed. Are they alerting friends to plentiful food sources? Enticing mates? Or merely announcing their presence?
Another theory is based on the fact that, after breaching, a great deal of dead skin and barnacles are sloughed off from the impact of the landing. Scientists trying to track individual whales based on their DNA noticed this convenient way of collecting genetic material. It isn't known if whales breach intentionally to scrape off the top layer of skin, water lice, or barnacles, much as humans scratch with their fingernails, but it seems plausible.
Perhaps whales have recently developed their frequent breaching as a response to so many barges, boats, ships, and people in the water. Since they have adequate eyesight, it's thought that they leap out of the ocean both to see and be seen by human-driven craft. This gives them time to prepare for a moving ship and also alerts a ship not to come too close to the area where the whales are congregating. This avoids injury to both parties.
Two lesser-known theories have to do with traveling quickly and preying upon fish. Aerodynamically, briefly leaving the water for the air might help a whale swim fast over long distances. Breaching may have energy efficient aspects. Secondly, whales might purposefully land directly on top of prey that otherwise they couldn't consume without getting bitten themselves. The forceful impact has been known to knock prey unconscious long enough for the whale to swallow it.