Homosexuality was treated similarly negatively in much of the world and much of human history, but US legislators have managed to move away from it being illegal.
Homosexuality was quite common and accepted in Europe until the widespread adoption of Christianity.