Why would zombies eat humans and not any other animals? Are there any chemicals or vitamins that can only be found in human bodies and not other animals?
Zombies are basically human rotting bodies.
To keep them together, they need to supply spare elements taken from a human body.
Eating a human body is the most direct way to get those, considering how clumsy the zombie are for getting food and also how necessarily inefficient is their digestive system.
Since they cannot fully digest food and use those elements back to synthesize bodily components, accessing human intermediates is the best compromise.
It's depends what kind of Zombie we're talking about:
Voodoo Zombies, where the word ultimately comes from, attack people because that's what their witch doctor maker/master desires.
The Plague Zombie popularised by the Night of the Living Dead films is more akin to the Germanic Ghoul and Umpyr, also the basis for the modern Vampire as popularised by Bram Stoker. In legend, ancient and modern, they hunt humans because they have to consume human life-force or because those humans have in some way wronged them and they're taking vengeance upon them. In film as far as I can remember the answer is pretty much "because they do" no further explanation required or given.
The modern Zombie of franchises like The Walking Dead owes more to Ramero than Voodoo with the idea that they attack to spread some kind of "Zombieism" (totally a word) disease that is functional similar to rabies in that it makes its hosts hostile towards other potential hosts.
As a note World War Z (the book don't bother with the movie) has Zombies that are substantially similar to many other modern Zombies but which hunt any fauna, including monkeys, moles, rabbits and at least one rather large alligator.
Zombies are simply the vehicle by which the zombie virus spreads itself. And the zombie virus, like many viruses, only infects humans.
Zombies of course have a never ending hunger for human flesh. But its not because they need delicious brains to survive. Rather, that craving to sink their teeth into the soft, tasty goodness of a living person is instilled by the virus as a means of ensuring it survives and spreads by infecting others. In a sense, the zombies are seeking out new hosts for the virus. And that host is humans. They don't attack animals (mostly, some may get confused) because biting a cow or horse does not spread the virus.
So yes, zombies will capture and devour terrified humans, ripping their innards apart as they feast upon their screaming victims. But some humans will evade the attack with merely a scratch or bite... and that ensures the virus is passed on.
From the point of view of the storytelling, the cannibalism taboo is one of the stronger and most basic taboos for the people of most of the cultures. If one wants to show the total breakdown of the society and lack of any culture and order (Warhammer Chaos style), the easiest way to depict it is to show cannibalism, necrophilia and incest in whatever order. The second component of the zombie myth is actual reanimation of the body - and that is also one of the oldest, most basic and most widespread fear we can see in the lot of human cultures. So, purely from the storytelling perspective, the cannibalistic undead is one of the easiest trope you can use to evoke dread and disgust to significant degree for the humans of the most known cultures.
If we are looking for the in-story explanation of cannibalism, I see two different explanation strategies.
The first one has less to do with feeding itself. It is a more archaic one, more similar to the traditional vampire stories - by whatever mechanism, the reanimated bodies retain some of the memories and the ability to recognize people. They would attack the people they remember feeling resentment to. Or, more horribly, the ones they felt attachment towards. As in Eastern European vampire stories, such zombies would shamble back towards their home and family, then start tracking and hunting all the people they knew. Such explanation would work well in the low-tech worlds to explain why zombies may walk across the wilderness to the nearest human habitation.
The second explanation is exactly about feeding and presumes that there is a cannibalism taboo. A thing reanimating the body is some sort of a parasite - a biological, psychic or magical one. And unlike the original inhabitant of the body, it sees humans as a possible source of meat. In the modern setting, with the contemporary population density, this parasite doesn't even need to see humans as the only food. A hungry zombie waking in the modern major population center would see hundreds of people around, much more then any other sources of recognizable food.
Mainly because of these reasons:
Density of population.
Humans will voluntarily pack more densely than most other animals... they even are known to build cities with high-rise buildings, providing only narrow escape routes, while at the same time reaching a higher meat-per-area ratio than other wildlife. For example Hong Kong has approximately 6,300 people per square kilometre (source).
A human provides 12% of mass in lipides (fat) and 20% of mass in proteins (see composition of human body), resulting in a whopping approx. 155.000kcal (see here). And those are only average values: deviations in body-mass index occur - accompanied by decreased mobility coming along with increased nutritional value.
Almost no defense, easy prey.
No horns, tusks, protective leathery skin, only insignificant claws and teeth. Bad eyesight, worse at night. Humans often are in need of corrective lenses. Humans are known to utilize tools, but access to more efficient lethal tools is regulated and restricted in most societies.
Wonderful reasons, accurate and informative. I think the true reason over the top of all of these is that eating humans makes it an existential problem for humans. Especially the humans in the story. If zombies were happy with dogs or dog food then the problem is just one of management. Where can we get enough for the zombies to eat that they will leave us alone.
In the (always) post apocalyptic world of modern drama you need a current real threat that requires constant attention.