The Federation has more than just Enlightened Humans in it. The Vulcans are a big influence, apparently, for the Prime Directive. The Vulcans, Andorians, Tellarites, etc, would not let an existential threat exist if they could help it. It's only the majority-human bridge crews (which reflect the Western 20th-century liberal attitudes of the writers much of the time) that seem to have problems with any of that. Heck, the Admirals that are often antagonists or foils for Our Heroes tend along the more pragmatic lines of dealing with problems. Did Sisko get any sort of punishment at all for rendering a planet uninhabitable to human life, while there were still humans on said planet? Not that we ever see.