In California, I'm pretty sure employers aren't allowed to discriminate based on religion (e.g. you can't not hire someone just because they're Jewish). In other words, religion is a "protected class".
So Eric the Employer hires Chris the Christian. Afterwards, Chris goes to his personal social media and posts
I believe in the Bible, which says "The woman shall not wear that which pertaineth unto a man, neither shall a man put on a woman's garment: for all that do so are abomination unto the LORD thy God." - Deuteronomy 22:5
The public sees this as extremely transphobic, and it leads to a huge backlash against Eric's company (and Eric personally may find such views repugnant). Does Eric have any grounds to fire Chris, or is Chris protected from being fired over it?
To be clear, Chris isn't just spouting things like "I hate trans people" or calling for violence against them or anything. He is explicitly making religious statements that link directly to his commonly-accepted religion.
While I gave a random specific example here, my question is more general. If any religion has any views (e.g. homophobia, or they don't like pineapple on pizza, or what have you) that are controversial, is an employer not allowed to discriminate based on that?