How do you kill something respectfully? Bow before you shoot it in the head? And why would that matter?
"Unnecessary" is a value judgement made by you, not an objective property of their death. They died for the purpose of furthering science and medical research – many people would consider that necessary even if fewer mistakes could've been made.
Not that it contradicts your core argument, but I'd be surprised if the number of animals slaughtered in a way that fails the official legal standard for ethical, but nobody noticed for one reason or another, is less than 0.1% of the total.
Killing pigs in a respectful way for food or medical research - ok.
Killing pigs for medical science in a unnecessary, disrespectful way that causes unnecessary tortuous pain to them while doing so- bad.