It is entirely within their religion to deny any position to anyone who violates the religion they are trying to inculcate in their students.
Besides, the school is not separate from the church. The school IS the church.
If you think about it, there are no doubt employee benefits which accrue to spouses of all employees of the school. This RELIGIOUS school would, in essence, be giving assent to the wicked lifestyle of homosexuals through their support.
Additionally, employees inevitably participate in many aspects of the life of the school. Do they want sodomites bringing their "spouses" to school functions? Would the school be allowed to bar them? Certainly not.