The short answer is: a lot of the time, humpbacks breach because they’re just itchy. How else are they going to scratch that huge back?
But the other three answers are also true! Big strong males like to show off to females by rocketing out of the water as high as they can go and making, literally, as big a splash as possible!
In the early summer, after the humpbacks have had a bit of a feed and feel confident they’re going to live another year, they celebrate. A lot of the small splashing around like what’s happening in this photo is saying hello to their neighbours, inviting them to join in the block party: The water is warm! There’s so much food! Ain’t life grand?
The warning signal, I’ve never witnessed this, and I haven’t yet found documentation of breaching and splashing to use as warning. The context I was given in conversation with a humpback of warning one male away from HIS group. SPLASH! Can you see how large and strong I am?
This same display is used to warn sea lions back, warn rambunctious teenagers away from infants, and to intimidate predators out of their hunting attempts. In the case of predators, they also give me a loud tail slap, which reminds me of a beaver: Heads up everyone! Trouble’s coming!
This is all information gleaned from animal communication. If you’d like to try this yourself, check out this episode of the Joyful Telepathy podcast on Wild Communication!