During the 1920s and into the early years of the Great Depression, the owners of Pepsi offered to sell their formula to Coca-Cola. Coca-Cola rejected it, of course, and to this day has had to fight Pepsi to remain the most popular soda brand in the world. One story is that Coca-Cola decided that it wasn't "worth their time" to purchase the recipe.
A man named Charles Guth (b. 1876 - d. 1948) owned a number of stores that happened to have soda fountains. After having Coca-Cola refuse his request to sell their syrup to him at a discount, he began shopping around for alternatives. He found that the owners of the Pepsi trademark and formula wanted to sell their company and he quickly snatched it up and, after having the exact formula tweaked a bit, began offering it at his stores.