Outside the EAZA though... such as those who build AZA zoos need domestics to build children's zoos.
Even in the EAZA what nutrit said isnt true.
Yes some zoos are removing their petting zoos and barnyard sections, but thats the important part some.
The vast vast majority plan on keeping them for the simple reasons of:
1. They are popular and rather cheap to maintain
2. Demolishing them Costs money amd gets rid of an attraction
3. Building something new there will take even longer and cost even more
And most importantly
4. Most Zoos got bigger issues.
Allmost every zoo still has some outdated habitats or big plans for the future, often both. Its not uncommon to see 2-3 currently worked on areas in any zoo and until all those old and often simply sad habitats have been removed or renovated it makes 0 sense to demolish a petting zoo
Removing a petting zoo in favor of 1 or 2 new enclosures for endangerd wildlife just isnt an realistic option in the next 10 years atleast for most zoos and even then most zoos take pride in taking care of old and endangerd breeds of lifestock as a part of the protection of cultural heritage.
The thing thats actually is currently a big thing is to swap out domestic breeds for endangerd ones with especally goats, sheeps and rabbits diversifying in breeds in recent years as many zoos adopt local breeds.