I wonder why Japan is so socially0conservative on this, when they're not that religious, and they never were under the influence of the Abrahamic faiths either which tended to be more anti-gay than the Dharmic and Sino faiths.
China was actually probably the most LGBT-friendly of the ancient civilizations, perhaps even moreso than Greece, and it was the greatest foreign influence on Japan. I believe the Samurai were often same-sex lovers too.
I think you could argue Japan is just a very "temperamentally conservative" society. Basically the highest goal you can pursue by their standards is to put yourself absolutely last in the hierarchy of people/things you try to please or make happy. Your ancestors, your immediate and extended family, your workplace, your community, the country, all of those are supposed to take priority over what you want or need.
Living an LGBT life means you will not produce children, which is seen as a dereliction of family obligations. Because your household is two people of the same sex, it's not possible for you to divide household obligations along traditional gender lines set by Japanese culture - another dereliction of duty.
Japan doesn't frown upon LGBT people because "OHMYGOD YOU SODOMITE YOU'RE GOING TO BURN IN HELL!" but because they are viewed, on some level, as being self-indulgent and undutiful.