It's really, really not. See below.
This is a fundamental misunderstanding of how protected classes work. Gay people were never made a protected class in 2013, however in some states discrimination based on sexual orientation was added to public accommodation laws. Protected classes are not black people, women, or gay people. EVERYONE is part of multiple protected classes which are race, sex, and sexual orientation. The day that law was passed you were protected to the same extent that gay people are, meaning if a gay bar refused to serve you because you are straight they would be violating the law.
The entire linchpin of anti-discrimination law is that we are all free to discriminate to our heart's content based on what someone DOES, not based on who they ARE. It's perfectly legal to discriminate against someone for being a police officer because that's a choice they made. I wouldn't do it, but it's legal.