The game traces back to Tang-Song banquet entertainments and shows up famously in 《
红楼梦》 (Dream of the Red Chamber) chapter 54, where the Jia family plays it during the Lantern Festival - whoever the drumbeat stops on must drink wine and tell a joke. The figurative finance use ('passing the bubble until someone is left holding it') has become extremely common in business writing about speculative manias.