IMHO, the New Coke “debacle” was a brilliant bit of guerilla marketing. Prompt people to buy up all of your old product, then at least try the new one, and then bring back the original to a boom in sales - some debacle.
I think it was in fact a big money loser for them, though I don’t have the numbers. It all stemmed from blind sip tests where the new formula finally was able to consistently beat pepsi. When drinking lots of it however especially with other food as part of a meal, people prefer it not so sweet.