Why’s the school lows the lawsuit, since the teacher signed an agreement?
Correction: Why’d the school lose the lawsuit, since....
Because the judge elevated personal opinion over simple contract law. They do this on the basis that the contract is immoral, which is a long-time element in contract law.
A murder-for-hire contract, for example, is not enforceable in court, nor are damages available for non-performance. This ruling says that an agreement to abide by Catholic moral guidelines is morally the same as an agreement to commit murder.
It will be alleged that it is not legal for a contract to include provisions which discriminate against homosexuals.