He possibly have been warned.
Yet it is relentless to not have at least wait the end of the school year.
We have also to make a distinction with being a theology teacher and a a teacher in general.
I think a school can fired a teacher, but for a good reason.
I have just discuss this with my husband and I don’t think that a Catholic school teacher can be fired for personal opinions outside of his work where I live. But maybe we can ask questions if he expresses anti catholic beliefs and work in a Catholic school.
Just to compare, for eg, one famous french philosopher, Michel Onfray, teach for many years philosophy in a Catholic high school before he left his post. He is an hedonistic, epicurean and atheist with anachist sympathies. he is also an euthanazy militant (and not only a militant…) More he is an anti catholic and anti religion in general, against what we teach in philosophy in schools.
He was never fired by his catholic school (as far as I know). We cannot just fired teacher as disposable products. Our labor laws don’t permit it. Of course some teachers have been fired for what they have done in classes.