I think it's a bit more complicated than that.
As far as "all of history" goes, ancient Greece for example tolerated a particular kind of "homosexuality", but not one we should try and emulate - it matched neither of two conditions in "consenting adults", for example.
While it's true that few if any societies other than "modern Western" would score as high as ours on Stonewall's diversity index, there were definitely ups and downs if you plotted things over time.
Go back several generations in the USA or Western Europe and it's absolutely normal for straight men to have close and emotional friendships for life; when photography was first invented, it was a thing that male BFFs had photos of themselves taken that I bet anyone today, if shown without context, would immediately pattern-match to "gay couple". I'm going to quote the "art of manliness" site, of all places, on this: https://www.artofmanliness.com/people/relationships/bosom-bu... (warning: images may be considered NSFW at your place of work, despite being absolutely non-pornographic as far as I can tell)
Some of these men were undoubtedly gay in the sense we understand the term, but the idea of having a close emotional bond with another man was certainly open to straight men too (and to some extent, also expected).
But then, to quote "The History of Male Friendships" linked on that page,
> First, men were free to have affectionate man relationships with each other without fear of being called a “queer” because the concept of homosexuality as we know it today didn’t exist then. America didn’t have the strict straight/gay dichotomy that currently exists. Affectionate feelings weren’t strictly labeled as sexual or platonic. There wasn’t even a name for homosexual sex; instead, it was referred to as “the crime that cannot be spoken.” It wasn’t until the turn of the 19th century that psychologists started analyzing homosexuality. When that happened, men in America started to become much more self-conscious about their relationships with their buds and traded the close embraces for a stiff pat on the back.
> [...]
> The man friendship underwent some serious transformations during the 20th century. Men went from lavishing endearing words on each other and holding hands to avoiding too much emotional bonding or any sort of physical affections whatsoever. Fear of being called gay drove much of the transformation. Ministers and politicians decried homosexuality as being incompatible with true manhood. And like most deviant behavior in the 1950s, homosexuality was associated with Communism.
So, once "gay" appeared on people's radar, heteronormativity shot through the roof and men were expected to be performatively straight, to prove themselves that they were not "tainted" by this new "affliction". That's where a lot of this pressure came from, it was definitely not constant throughout all of even relatively modern history.