For the entirety of the barnacles' lives they'll exist as diminutive hitchhikers on the backs and bellies of whales. They derive two basic benefits from this commensalistic relationship. As filter feeders, they depend on the availability of plankton, which they filter into their bodies through feather-like appendages extended through holes in their shells. When the whales swim into plankton-rich waters to feed, so do the barnacles.
For the whale the barnacles don't really annoy them.