From Wikipedia:

    The chocolate chip cookie was accidentally developed by Ruth Wakefield, owner of the Toll House Inn near Whitman, Massachusetts, in 1933. The generally accepted story goes: Mrs. Wakefield was making chocolate cookies but ran out of regular Baker’s chocolate and substituted pieces of semi-sweet chocolate broken apart using a machete, assuming it would melt and mix into the batter. It did not, and the cookie with chips of chocolate was born. (The restaurant, housed in a former toll house built in 1709, burned down in 1984.) Mrs. Wakefield sold the recipe to Nestlé in exchange for a lifetime supply of chocolate chips. Every bag of Nestlé chocolate chips in North America has her original recipe printed on the back. Today, the chocolate chip cookie is one of America’s favorites.

    But according to Carol Cavanagh, of Brockton, Massachusetts, whose father, George Boucher, now residing in South Dennis, Massachusetts, was the head chef at the Toll House Inn, from its opening to its closing, the true story of the cookie’s creation goes like this: Ruth Wakefield was known for her sugar cookies, which came free with every meal, and were for sale in the inn’s lobby. One day, while mixing a batch of sugar cookie dough, the vibrations from a large Hobart mixer against the kitchen’s wall, caused bars of Nestlé’s baker’s chocolate on the shelf above to fall into the mixer, where it was broken up and incorporated into the dough. Ruth thought that the dough was ruined and was about to discard it, when George Boucher stopped her and talked her into saving the batch. His reasoning was out of frugality rather than a prediction of the cookie’s future popularity. Logically, the accepted story of the cookie’s origin doesn’t hold up since Ruth Wakefield was an accomplished chef and author of a cookbook, so would have known enough about the properties of chocolate, and that it wouldn’t melt and mix into the batter to make chocolate cookies, while baking.