Mr. Krabs tells the Bikini Bottomites about the dangerous story of the hooks that have returned to town. He explains that the fishermen reel sea creatures out of the ocean to either sell them in a gift shop or store them in a tuna can, which the only perspective of being in is the scent of mayonnaise.
SpongeBob has trouble opening a jar of mayonnaise. He uses the conch signal to call Mermaid Man and Barnacle Boy to help him, though they refuse and tell him that the conch signal is not a toy and should only be used for emergency purposes.
Mayonnaise is used as a weapon against Plankton's tank robot and all the customers want to hold the mayo from the Krabby Patty.
At the end of the movie, it is also revealed that Gary hates mayonnaise. SpongeBob uses it as a way to trick Plankton--who is disguised as Gary at the time to steal the formula--by giving him a Krabby Patty with extra mayo.