I'm not defending the church on a personal level just stating why they believe they have the right to fire someone who doesn't practice all the tenants of their faith. The church probably believes they had a BFOQ.
-- A “BFOQ” stands for
Bona Fide Occupational Qualification, and differs from the right to discriminate in that it allows an employer to discriminate based on religion, sex, or national origin if the position absolutely requires one of these protected classes.
An important distinction between the two, is that BFOQ is more narrowly defined as opposed to a religious organization’s right to discriminate. The former relates more to the job itself, whereas the latter focuses on the nature of the employer.--