Paragraph 175 of the German code made homosexuality illegal. It had already been illegal under Weimer and the Reich before, with varying degrees of enforcement. The Nazis strengthened it, started going after even non penetrative sex.
Pink triangle prisoners were among the lowest of the low, similar to Jews. The goal was to work them to death, in the brick works. Theres a lot of horrific fucked up sexual sadism when you read these accounts. (Having sex with a man is only gay if you love him, I guess)
Then, when the camps were liberated:
The American policy toward gay inmates in the US-controlled zone of occupation was based on the Handbook for Military Government in Germany Prior to Defeat or Surrender, which was compiled by the Combined Chiefs of Staff of the US Military in 1944. Part of the Handbook was dedicated specifically to directing American troops how to classify and handle the large number of concentration camp survivors. The policy for those interned based on criminal actions stated, "Ordinary criminals with a prison sentence still to serve will be transferred to civil prisons." Since many pink triangle prisoners had been convicted of violating Paragraph 175, a law of the German Criminal Code that predated the Nazi regime, the Americans also classified them as criminals. Therefore, those who had not finished serving their sentence were often transferred to prisons.
Homosexuality remained illegal in West Germany until the 70s. This also meant that there weren’t even accounts of the things that happened in those camps, because the social stigma didn’t go away…