The remembrancers in A Thousand Sons are a lesbian couple and there's a suggestion of other gay characters in other books.
Actually the Mechanicum doesn't care much as they have relationships based on intellectual levels and most children are produced in replicae vats - so procreation isn't even required.
Given there's already like a trillion people on Terra with most starving to death and Hive worlds have populations so vast that they often have to ship billions off to populate newly conquered worlds - I don't think the Imperium is lacking for people.
The tenets of the Imperial faith are mostly about working hard and never questioning authority. Personal issues arent given much space as the Ecclesiarchy doesn't really care what the lower orders get up to as long as they don't rebel. And the higher classes mostly get away with whatever they like.