Same as women. For most of our human history women were treated as second class citizens. Could not vote, own land, get a job. Over the last 70-80 years in Western countries only have women gained rights equal to men.
This condition will not long last. I am coming around to the opinion that it is not even natural or sensible. This "equality" concept is a Christian concept. Islam does not have it.
Most of the Muslim world is still backward in this respect.
"Backward" is a perception. They see us as backward, and themselves as completely sensible. What people don't grasp is that many divergent opinions result from having differing fundamental assumptions. Islam is one
giant pecking order from the lowliest slave to the highest Sultan, and beyond him the Prophet Mohammad and then Allah.
"Equality" is offensive to Islam. Nobody can be equal. Allah has servants of varying degree, and the more pious are better and the less pious are lesser.
It's called tradition and old ways..hard to break.
If you look why gays were hated in past years much of it had to do with the concept of bringing forth children. Most societies needed as many births as they could just to survive or fight wars and if you did not have kids you were a pariah . In many old societies women who could not have children were literally thrown out to die.
That is just a piece of it. Yes, not having children was considered very bad because it was people that made a community or a nation stronger than it's potential enemies. The powers that be have always regarded it as the duty of the people to make more people to help defend the homeland.
But imagine for a moment how life would be for homosexuals prior to antibiotics and antivirals. They would tend to fall victim to any venereal (or other) diseases circulating amongst their pool of partners, and they would become sickly over time.
People would notice that those men who wanted other men would generally waste away from some horrible affliction, and in those days they associated maladies with evil.
Add to this their propensity for suicide. (Also a big taboo in Christian culture.)
Add to this their propensity to molest boys.
When you add all these tendencies together, the long and widespread ostracization of homosexuals from the general society makes a lot more sense.
And I haven't even mentioned how over represented they are among the ranks of serial killers. Yes, far more homosexuals are serial killers than ought to be represented by their percentage of the population. They ought to make up 1.8% of all the serial killers, but they are closer to 50%.
I operate under the assumption that it is an inherent characteristic of a subset of the larger demographic of homosexuality, and has always been the same throughout history.