Necromancy as magic is not always viewed as evil. Odysseus performs necromantic ritual during his travels. Ovid mentions it in his works as well. It's more of the dead divination (asking dead for guidance/answers/prophecies), than making undead creatures.
The Bible forbids even these practises and Mosaic Law prescribs the death penalty to practitioners of necromancy. Still, we have King Saul had the Witch of Endor invoke the Spirit of Samuel. The witch was quite shocked she succeeded and the whole thing ended badly for Saul.
And later Christians rejected the idea that humans could bring back the spirits of the dead and stated those were in fact disguised demons, connecting necromancy with demon summoning. During the Middle Ages necromancy became "demon magic", something evil and this kind of stuck.
I hope this helps.