A specific rare type of zombie that does this would make more sense than it being an ability possessed by your garden-variety zed, yeah. Probably a ‘Ghoul’ or something similar; a lurking sort of undead that avoids contact with the living if possible, preferring to stay out of the fight and pick over the remains afterward; unfed ghouls will probably flee if attacked, like a prey animal. As they feeds, though. they grow stronger, and less fearful of the living, more likely to get closer to them while feeding, and more likely to decide to attack if aggressed. Some time after they become strong enough to no longer fear the player at all, they’ll attack unprovoked if there aren’t any corpses around.
Given their propensity to flee and hide behind other undead, chasing them down will always be a tough choice; even a young Ghoul can lead you into lots of trouble, if you incautiously chase it down. You might let them get away… but if you’ve left a lot of bodies lying around, you might be in for a tough fight next time you see them.