Even if they were to take the recipe and publish it for all to see, you would still need all of the other machinery that is Coca-Cola to make Coca-Cola.
And then you have issues of quality. Coca-Cola has certain standards, it's not a guarantee that everyone else will have those same standards. Like, people buy the expensive brand of milk despite all milk being the same. It's one ingredient. With quality standards given by the government. There is really no room for interpretation.
What about quality? That has nothing to do with it.
Of course they're trying to be the better coke, that's why they tried making coke with the same color with more sugar and made the flavors stronger.
Even if you could replicate the exact flavor, you’d still need to do it at scale and get it into stores and convince people to buy it.
As to “just make it yourself”, everyone can make a sandwich, Jersey Mike’s and several other sandwich shops exist successfully.