I'm about 1/8 of the way through Jack Lynch's The Lexicographer's Dilemma, and am already finding it highly enlightening. Lynch chronicles the codification of English grammar, which didn't happen until the 17th century. Before then, English was a messy, unruly language. There were no standards of spelling, syntax, or usage. Even Shakespeare was guilty of grammatical errors like using double negatives, dangling participles, and split infinitives.
What's so fascinating about the book is that the rules of proper English emerged as a bottom-up Hayekian process, not from an imposition of a few educated sticklers. As Lynch tells the story, grammar emerged side-by-side with rules of etiquette. During the 17th century, commerce created a new class of arrivistes in England, neither peasant nor landed gentry. As the newly rich found themselves in social situations they were unfamiliar with, they needed to learn the mores of the elite to better assimilate without social anxiety. Thus, etiquette guides were born. These etiquette guides also began to codify the manner of speaking the members of the upper class were using, for the sake of those who needed to ape their mannerisms.
In an earlier blog post I argued that, nowadays, correct pronunciation is a shibboleth for being educated. But in the 17th century, proper usage was a shibboleth for class. Grammar guides weren't demanded by the upper class. In fact, they despised anything that would allow the nouveau riche to enter their ranks unnoticed. It was economic prosperity that drove the need to sound like those who were already rich (due to government mandate), and thus led to the rules of grammar we use today.