in the past ,it was common for musical bands to travel around the united states on wagons. The band played music to announce a parade or political speech. To show their support, people jumped onto the wagon and joined the musiciands. Today, this idiom means to support a popular belief or idea. It usually refers to someone who hopes to benefit from supporting another person's idea.