Look I'll be honest with you:
the only reason why anything is evil in DnD is because the creators think you need a clear visual indicator of Acceptable Enemy Target to kill things mindlessly like a murderhobo. to put it bluntly in tvtropes terms DnD is an action game and thus needs mooks for that action to happen on

Problem is my experience the only people who actually need such clear visual indicators are DnD players. I don't see this attitude from Skyrim players-they just kill whatever attacks them without worrying much about it, they kill both human bandits and draugr by the truckload. like open world videogames shows very much that people are willing to kill whatever fictional thing without guilt. while superhero and action hero stories are full of people who are just normal human criminals get punched out by the capes or shot down by some guy with a gun. in short, DnD has this weird hang up that I don't see anywhere else.

but still, DnD has it and thus zombies are made to be mooks so that you, the hero of the story and thus the most important person in that story can slaughter them without a second thought, term jersey morality is wrong because it assumes that Good is somehow narratively equal to Evil: its not, Evil exists to be Good's punching bag and foe and thus lesser than Good by being incredibly obvious to spot. I personally find this superfluous and unneeded. I can create my own black-and-white morality narrative thank you very much, and I don't need flashing neon signs to determine whether something is evil and kill them without guilt. If human bandits are attacking a caravan a detect evil spell is being overly cautious. A world where a necromancer has no alignment but still uses undead to do various horrible things so it can take over the world or something is still objectively evil. If you don't want moral complexity or well intentioned extremists, don't include them, its simple as that.

in short, creating undead is evil because of this weird DnD attitude of being broken up about the things you kill if they don't have the right visual indicator flagging them as guiltless when the true guilt is self-created. Other franchises don't need such indicators, when I kill a raider in Fallout, I don't get broken up about how that raider was a living human who was trying to get by through taking stuff by force from others. Why would I? Screw that guy. I don't need him to be undead to kill him, loot him and be on my merry way. He attacked me, he deserved what he got.

Meanwhile if I'm playing evil why would I care at all?

the only reason the undead exist is to fulfill an enemy role in a combat game, when that role can be really be fulfilled by any mook without much trouble, as a lot of media demonstrate and the only reason it doesn't is because DnD is weird and builds a strange overwrought system of morality to do what other games accomplish without it; it thinks too much on why when good proper mooks aren't about why they are mooks, they just exist and attack then die. thinking on the why of a mook exists is already thinking too much. what matters is they do exist, they are attacking you and they're not going to stop attacking you.