Originally coke had caffeine in it from the kola nut. This nut is used as a folk medicine remedy fro coughs. If nothing else the caffeine will make you feel less tired. The leaves of the plants are what contain cocaine, not the nuts. Although the cocaine was also used as a folk medicine and would make you less tired and feel better.
Coca cola was initially sold as a tonic to make you feel better if you were sick. The caffeine as well as the cocaine was the main active ingredients. But people figured out they could drink it when not being sick and they would still feel better. Coca cola were forced to remove the cocaine and reduce the caffeine but still retain some. Caffeine does make you feel better and less tired in addition to being addictive. So they added as much as they could get away with at the time.
Currently however the limits for how much caffeine the authorities lets people get away with putting in soft drinks is much higher. The energy drink craze have resulted in cola of other brands with significantly more caffeine then coca cola or pepsi.
It is added, and listed in the ingredients. Originally (late 1800s, early 1900s), cola was made using the kola nut which has naturally occurring caffeine. (Many plants, just like the coffee bean plant, produce caffeine as a natural insecticide/insect repellent.) The caffeine also added bitterness to balance the sweet, and gave the cola its unique taste, which became popular. Some old colas also used tea, for the same reason. Over time, they stopped using kola nuts, but added caffeine to try and match the original taste.
Some root beer does have caffeine, like Barq’s.
It would be difficult to add caffeine to a lemon-lime soda because caffeine is bitter, though it’s possible that there is some rare example out there. Some orange soda has caffeine, like Sunkist. Also, Mountain Dew is a citrus soda with a ton of caffeine, but tastes notably different from lighter citrus sodas because of that.
Early soda’s like Coca-cola were intended to be medicinal. You would drink it as a tonic to make yourself feel better when sick or low in energy, similar to how energy drinks like Red Bull are marketed today.
The first concoction contained many essential oils, Kola nut (which is the source of the caffeine) and Cocaine which was legal at the time. (although the amount of cocaine in Coke was quite small)
Coca-cola no longer contains cocaine for obvious reasons, but coca leaves are still used to flavor Coke. Coca-cola is the only company in the US with a permit to import coca leaves, and the cocaine that is made as a by-product is used by the medical industry.
The caffeine in Sodas today is added both for its distinctive bitter flavor and because of its stimulant qualities. The sugar + caffeine mix in most sodas gives you energy and wakes you up.
Pepsi was invented as a rival cola to Coke so it had a number of similar ingredients including the caffeine.
The answer is in the history of Coca-Cola. **TL:DR; Coca Cola was an 1890’s version of Monster Energy Drinks.**
The Coca Cola recipe was first developed in the late 1800’s, At the time, one of the most popular ‘energy drinks’ was something called ‘Vin Mariani’, which was wine with coca leaves. In today’s world, it would be like having a Vodka/Red Bull cocktail, with enough cocaine to keep you going. Note that it was actually real cocaine, just not strong like today’s purified powder. Put another way, it was like taking a couple of Sudafed, but not a big hit like crystal meth, even though it’s a similar chemical.
So Coca Cola was a non-alcoholic alternative to Vin Mariani. It was literally designed to be an energy drink, like modern day Monster and Red Bull. So the ‘Coca’ was from the coca leaves, and the ‘Cola’ was from the kola nut, which is a plant that was used for flavor, and because it contained a really good dose of caffeine.
Over the years, we’ve discovered that cocaine in the soda isn’t a good idea, so the formula for these types of drinks were changed to eliminate the cocaine (though supposedly an amount that is too small to matter is still in the formula as part of the flavorings!) But caffeine is still very acceptable in today’s world, and so it’s still in the drinks!
Latest Answers