Bill Bryson is a more popular writer on the subject of language.
Discussing changes in word meanings, Bryson writes:
Surprisingly often the meaning becomes its opposite or something very like it. Counterfeit once meant a legitimate copy. Brave once
implied cowardice — as indeed bravado still does. (Both come from the
same source as depraved). Crafty, now a disparaging term, originally
was a word of praise, while enthusiasm, which is now a word of praise,
was once a term of mild abuse. Zeal has lost its original pejorative
sense, but zealot curiously has not. Garble once meant to sort out,
not to mix up. A harlot was once a boy, and a girl in Chaucer's day
was any young person, whether male or female. Manufacture, from the
Latin root for hand, once signified something made by hand; it now
means virtually the opposite. Politician was originally a sinister
word (perhaps, on second thoughts, it still is), while obsequious and
notorious simply meant flexible and famous. Simeon Potter notes that
when James II first saw St. Paul's Cathedral he called it amusing,
awful, and artificial, and meant that it was pleasing to look at,
deserving of awe, and full of skilful artifice.
This drift of meaning, technically called catachresis, is as widespread as it is curious. Egregious once meant eminent or
admirable. In the sixteenth century, for no reason we know of, it
began to take on the opposite sense of badness and unworthiness (it is
in this sense that Shakespeare employs it in Cymbeline) and has
retained that sense since. Now, however, it seems that people are
increasingly using it in the sense not of bad or shocking, but of
simply being pointless and unconstructive.
According to Mario Pei, more than half of all words adopted into
English from Latin now have meanings quite different from the original
ones. A word that shows just how wide-ranging these changes can be is
nice, which is first recorded in 1290 with the meaning of stupid and
foolish. Seventy-five years later Chaucer was using it to mean
lascivious and wanton. Then at various times over the next 400 years
it came to mean extravagant, elegant, strange, slothful, unmanly,
luxurious, modest, slight, precise, thin, shy, discriminating, dainty,
and – by 1769 – pleasant and agreeable. The meaning shifted so
frequently and radically that it is now often impossible to tell in
what sense it was intended, as when Jane Austen wrote to a friend,
‘You scold me so much in a nice long letter ... which I have received
from you.’
Best Answer
The precise meaning of many if not most words changes over time, for various reasons. There's a slight tendency not to revert to an earlier meaning simply because that would imply the direct negation of whatever caused the original change.
The example gay was originally coined within the homosexual community, so obviously it didn't originally have pejorative associations. They just arose naturally when the new meaning became more widespread, because the general population still includes some homophobes. Younger speakers tend to be less homophobic, and many now use gay as a general-purpose insult without necessarily even thinking about sexual orientation.