It did mean happy... in the 1600s
In the 1700s, the word got extended to mean “man who sleeps with lots of women” (a “happy” man)
By around the 1920s, it had evolved to mean “women who slept with women”. I don’t remember exactly how that change came about, I’ll look into it.
It was around the 1940s/50s that the word started to mean “men who sleep with men”, and it actually meant anyone who was homosexual for awhile.
So, the word has a lot longer and more complicated (and fun!) history than lots of people (especially homophobes) give it credit for.