Ludzie mają zwierzęta ... ale koty mają ludzi.
I didn't understand why the ending is "zwierzęta". Could someone help me please?
Neuter nouns with the nominative ending -ę are quite rare and undergo irregular declension:
https://en.wiktionary.org/wiki/-%C4%99#Declension