We humans eat food so that we can convert chemical energy into the activities that keep us alive, from breathing to reproduction. It's our metabolism that maintains these processes. Metabolism is an overarching term encompassing all of the chemical reactions that happen within our bodies.
In theory, zombies consume brains because they, too, require sustenance that perpetuates their ability to function. There's just one problem — zombies aren't actually alive. As members of the undead society, they lack metabolic capabilities of any kind.
The nutrients that humans consume begin to break down the moment we start chewing up a slice of pizza or quiche. Our stomachs take over from there, converting those nutrients into calories that we need to stay alive.
Zombies, on the other hand, have no metabolism at all. Even if they could magically summon the energy to chomp on some tasty brains, their stomachs (if they even have stomachs) couldn't provide a chemical pathway for nutrients to convert to energy, leaving the undead rather inanimate and, well, lifeless.