legits and legalities?

Just noticed http://arty.li/ZxY regarding the anti-gay drive in the democracy of Russia. IDK re correctness of actual incidents rise-up after the anti-gay laws came about. However, I can perceive that such laws do provide a sense of self righteousness for some people to attack gay people. (..or other groups singled out by a law..)
This is a challenge to the stuff I was thinking past few years regarding legitimacy’s requerement for laws. ie that X has to be 1st legit/illegit for laws to pass + if laws do not correspond to social legitimacies, they either take time to be enacted – or none at all.. (equal pay a case in point..?)