From Wikipedia:

Literally, a bandwagon is a wagon which carries the band in a parade, circus or other entertainment. The phrase "jump on the bandwagon" first appeared in American politics in 1848 when Dan Rice, a famous and popular circus clown of the time, used his bandwagon and its music to gain attention for Zachary Taylor's campaign appearances. As Taylor's campaign became more successful, more politicians strove for a seat on the bandwagon, hoping to be associated with the success.[...]