Every villain on the screen needs a weakness. Zombies have two: They're slow, and they're really stupid. They're basically just cannon fodder for the hero, and the only advantage they have is their numbers.
NOTE: We're talking about the classic zombie-virus zombies here, not Voodoo zombies and certainly not those god dammed White Walkers from Thrones. Voodoo zombies and Thrones Walkers are similar, but totally different. It's like mixing Batman with Deadpool, because it's just not allowed.
Just like the coyote and roadrunner (look it up if you have to), zombies have to follow a set of rules. Why? Because absolutely everything in movie / TV fiction has to follow rules, that's why. If you start breaking the rules, even just a little bit, everything goes straight to hell all at once. There ain't no gravity in deep space, so how come people walk on the floor in the Millennium Falcon or Starship Enterprise? Superman never has any facial hair, but what kind of razor can shave the man of steel? John Rambo is obviously immortal, so why does he duck when people shoot at him? Because there are rules, that's why.
Look at any haunted house movie if you need to see how the rules work. I use those movies because they all follow the same movie rules. Rule 1: The ghost / demon / whatever must not reveal itself in the first act, but must resort to moving stuff around off camera, making lights flicker, messing with the radio / TV a little, and making mysterious noises in other rooms. Rule 2: Supernatural activity of any kind can only be conducted at night, preferably between midnight and 3:14 AM, no exceptions. Rule 3: The ghost / evil spirit / whatever must be doing their ghost-stuff for a reason, and figuring out that reason is how to defeat them.
See how this stuff works? Zombies are slow because that's the rule, and nobody gets to question The Rules.
Zombies have to be slow, because if they were fast they'd be harder to kill (even though they're already dead). Their entire reason for existing is to be killed, but they can only be killed by a hero (or villain, if the plot allows it)