Presumably it's that rule where nouns aren't articulated after prepositions (except cu).
The word doesn't have an article because the phrase doesn't reffer to a certain synagogue. "Rabinul predică în sinagogă" talks about one specific rabbi (the word has an article) and he preaches in a synagogue, but we know nothing about it. "Rabinul predică în sinagoga frumoasă." Here we talk about one specific synagogue, the one that is beautiful, so we have the word with an article. I hope it makes sense :)