Bajor was just a fruit to be picked by any nearby power, and Federation was offering Bajor the better option. When the wormhole opened it just became that more imperative. Since the Fed had had its own war with the Cardassians, it wasn't exactly altruistic of them to be involved, but that didn't make their attempt to save Bajor from a second, more successful genocide an immoral action.
Bajor had had spaceflight and some form of interstellar flight or at least the knowledge how for thousands of years. For whatever reason they'd never bought in to the tech the way their neighbors had. It wasn't because they were less mentally capable, nor does Bajor appear to have heavy gravity (pretty sure every species home world in Trek has a magic 1G) so they could have made it. It reminds me a bit of the Andaman islanders, especially North Sentinel Island: aware of the outside world but wanting no part of it.
But Bajor didn't have anyone protecting them apart from the Federation, and after a successful rebellion and resumption of sovereignty (probably helped by Cardassia's entanglements with other local powers) they errantly clung to an ideal of their own exceptionalism.