I would say that the reason it is legal is because the American people have allowed its government to usurp their power almost entirely.
We have allowed this to happen.
That’s not completely accurate. A lot of the laws banning gay unions were in place and legitimately passed by many state legislatures. It has been a slew of judges and circuit courts just deciding to overturn what the voters had decided.