To put it very simple, homosexual activities in ancient China were not as frown upon as in modern China (post Westernization) is because:
1. (cis) Men are the only one who were considered as people.
2. The main purpose of a man was to produce a male offspring.
3. Women have no real identity. Most if not all women in Chinese history have no record of their real names being written down, only their status or titles were recorded, meaning that women sere not seen as people, but property (of men).
(In contrast, ancient chinese men have many names to express their identiy, adulthood, and personality.)
4. As a result, in many records, man having sex with another man was often considered a quirk. Men often seek it from brothol or from their young male servants. It may not be a thing to be openly brag about, but it was not considered a big deal as long as said man has a wife and was producing male offspring. THIS IS VERY DIFFERENT FROM THE MODERN DEFINITION OF BEING “GAY”.
5. There were genuine homosexual men among those records, but it is often hard to tell because depending on the period of time and the man’s cocial status, it is difficult to simply put the modern definition of being gay on them.
6. Lesbians are even more difficult to identify because women have to marry back in the day and in most cases they can’t live independently without belonging to men. Some of the more well known homosexual activities among women were about the women in the heram, which itself is an extremly closed and supressive envirnment, where except the empreor, the only men who can contact those women are eunuch. So it’s hard to tell if those acts are because of the women’s sexuality or simply because they have no other safe way to release their sexual frustration.