For the same reason allowing interracial marriages was a matter of law, ending segregation laws were a matter of law, giving non-whites and women the right to vote was a matter of law, giving slaves their person hood and freedom was a matter of law. Allowing freedom of and from religion was a matter of law. Hell the reason why any right was a matter of law. Because peeps gonna hate, and they will try to justify that hate with normalcy, rules and laws to allow them to continue hating. Until enough people rise up to overcome that hate and overturn those laws or write new ones to circumvent them.
There should really only be two laws: 1. Don't hate. 2. Mind your business.