Republicans said the law is necessary to protect "religious freedom" by making it clear that certain types of discrimination are legal.