Coca Cola is still a thing among amateur endurance athletes (think cycling for days with minimal rest) and there's nothing inherently wrong with it. It's just water, plenty of sugar and some coffeine.
And a ton of phosphoric acid.
So drinking water and a sip of cola is fine, but drinking cola against thirst has side effects as you need water to process lots of sugar.
Consuming plain water during really long endurance events can cause hyponatremia. Not recommended. But for the short 10k and under running events that most of us do, it doesn't really matter much.