Eugenics is based on animal breeding, something that's been around for thousands of years. Blaming eugenics on science is like blaming murder on guns.
Well, that depends on whether science is really a neutral tool for discovery or a system of thought with principled, and not simply pragmatic, claims. Science at the time of racialist eugenics used to be the latter, and philosophy-of-science people are still arguing over whether it is currently a system based on non-neutral principles or a system of practical inquiry.