It was a FEDERATION MEMBER WORLD. We've seen many times the process involved to become one. We also know the rules the Federation has to become one. They couldn't have past the modern day Fair Trade Coffee /conflict free diamond certification processes, let alone joined the Federation. There's no way they were admitted without willful ignorance on the part of the Federation, probably because the Federation needs their resources.
Your explanation requires vast incompetence on the part of the Federation, to the point that they'd still be morally wrong and heads should be rolling, with every other world held under a microscope, and ignores the history of the Federation doing whatever it wants if it means it gets the resources it needs. Like allowinghuman trafficking as long as the women end up on world's with Dilithium or secretly kidnapping and relocating and entire people to suck out their atmosphere.