Parsha Mitzvot: Terumah: A “Polluted” Synagogue
The beadle of a synagogue in Aragon had homosexual relations with a boy in the synagogue. Did his act pollute the synagogue so that it is forbidden thereafter to pray in that place?
Rabbi Isaac Mizrachi replies that since it is rumored that it is forbidden to pray there or to keep a scroll of the Torah there, he feels obliged to proclaim that such an opinion is wrong. Indeed, it is wrong even to voice such a vie. if it were correct, it would mean that it is forbidden to pray in any house once occupied by Christians, since they all have icons before which they burn incense. Even though idolatry has been practiced in such houses, it is the universal Jewish practice to rent houses from Christians and to pray in them.
The rabbis say (Avodah Zarah 52b) that even the holy Temple did not become contaminated when the Greeks set up an idol there. In the Chanukah prayer we declare that the Greeks contaminated the Temple, yet when the Maccabees re-consecrated the Temple it was used as before. If a place possessing the great sanctity of the Temple does not lose its sanctity because of the severe sins committed there, a lesser sanctuary such as the synagogue obviously does not lose its sanctity even if grievous sins have been committed there. – Teshuvot Mizrachi, #81