At the very least, powers in a position to bargain - powers that aren't completely amoral or immoral, mind you - will insist via political influence that their partners hold themselves to certain moral and/or ethical standards. Remember that there are requirements a civilization must meet before they are granted Federation membership.