What is often rarely if ever mentioned by the press is the fact that when you go to work for a Catholic school you are working for a particular diocese. As such you are generally asked to be a representative of Catholic teachings in action and live a life that exemplifies these standards.
I used to work for my diocese for several years. There is usually some written agreement to the above, with some diocesan agreements being stricter than others. Depending on the directives of the bishop, employees are expected to live according to certain standards and promise to do so as part of their work contract or job description.
The Catholic Church isn’t against having homosexuals work for their organization. Normally the Church does not get involved in the private lives of its employees. But if your employment with a diocese came with this understanding (and I don’t know of any that don’t), you are pretty much promising to set an example which in many ways is a bit higher and demanding than that of average Catholics.
Marriage is a public declaration of a union, not a private one. It is performed before witnesses. When a person makes a public statement by words or deeds that is contrary to Church teaching, they state by such public actions that they are not in full communion with the Church and its teachings. When your job requires that you live such a life that witnesses to full agreement with the Church, such a same-sex marriage disqualifies a person from employment.
The situation, however, differs for a Catholic who is not an employee of the Church or who might be exercising their conscience in a manner that is not as conspicuous or far more discreet than a public declaration in full eyes of the law. This does not mean that the personal choice is any more or less morally acceptable under such circumstances. But the Church has a current stand on marriage. One cannot publicly declare by their words or deeds as Catholic doctrine that which is not. One who is an employee of a diocese agrees to live a public life that represents authentic Church teaching. When your public witness is a statement of what the Church believes by employment contract, you risk such employment when your public life becomes anything but.
For sake of argument, a homosexual in a committed relationship that is not public knowledge might not face that same loss of employment as one who gets married. (This is not to say such circumstances are allowed or disallowed by any particular diocese. This is just in reference on what can be legally argued.) The Church has even recently stated that it is seeking ways to include gays and lesbians into the Church in ways that keeps them from being unjustly marginalized. Becuase a heterosexual would also be released from employment for failing to live up to the same standards, the issue is not sexual orientation.
Yes, the issue could go further. But this is the basis for such releases. Unless such an agreement of living a public life in agreement with Catholic teaching was somehow less than generally explicit (and this can be a legal argument of its own if it is not detailed in writing), anyone who gets fired for failing to live up to certain public standards as a representative of the Church cannot win a claim that they unfairly lost their position. A contract has been broken.