I agree. A city has a lot of or many palaces. "Contains" is a slavish and unnatural translation mot-a-mot of "a contine."
To me was accepted ”a lot of palaces”, but not ”the town”. On the other hand, I think that in the both languages the word ”conține”/”contains” is improper for this phrase. A city or a town ”has” many palaces or a lot of palaces, not ”contains”. We can say ”a book contains many pages or pictures” or ”the box contains toys” etc, just to specify the content of a object.