The actual prohibition is against drinking hot beverages, not caffeine (Doctrine and Covenants 89:9 "And again, hot drinks are not for the body or belly.") The most common hot drinks also contain caffeine, so some Mormons took this a step further and don't drink cold drinks with caffeine.
The LDS Church officially stated a while back that caffeinated soda was fine and that
hot drinks meant coffee and tea, so hot chocolate would be fine as well:
https://newsroom.churchofjesuschrist.org/article/mormonism-news--getting-it-right-august-29. The dirty soda trend started in Mormon communities around this time, I believe.
That said, I also agree with others that this is pretty much just how lots of Americans eat. I'm not Mormon and I grew up having a Dr. Pepper and a honey bun for breakfast most days.