Except your example doesnt work. If coke and pepsi didn't advertise, more people would drink RC Cola and Faygo and fruit juice. Drinks are not a duopoly.
It’s a simplified example, but there is a point where cola-wars advertising turns into a negative sum game while still remaining the optimal strategy for each individual player. Coke and Pepsi can beat the smaller brands through distribution alone anyway.