It's their club song.
In 1926-27 they achieved a club best after an inspired season finishing in sixth place. It was during this period that the Hammers acquired it's club 'song'. An advertisement for soap featured a curly-headed baby blowing bubbles, and this was likened to one of the West Ham players, so the song was jokingly aimed at him, but the, sometimes appropriate, words of 'I'm Forever Blowing Bubbles' ensured the song was to remain a permanent feature at matches involving West Ham.