Yep. The show was written by humans, humans are flawed, therefore the show is flawed. It’s constantly undone by an unholy mix of things that seemed okay at the time, things that were written to try and correct the things that previously seemed okay at the time (but which made things worse), the personal flaws of the creators seeping into their works, and a pile of crappy tropes that TV can’t help but lean on. It’s weird that you think this is something that isn’t a consideration of the show ‘anymore’; this all goes back all the way to the 60s. Original Trek is occasionally misogynistic crap, and once went so far as to describe Nazism as the most efficient form of government. TNG had episodes that were straight up racist, and characters that are accidentally written as creeps. This is a problem the show has always had, and sometimes you just have to deal with that to get to the good stuff.
I would suspect that the real draw to working with Starfleet for non-federation personnel isn’t any concept of wages, but a comprehensive benefits package. Presumably Starfleet membership confers some level of personal federation membership, possibly for both you and your immediate family, which may mean that you get to move your loved ones to a mostly-utopic federation world.