There is no rule stopping women from joining the NBA. It’s just that no woman currently is able to compete at the highest level when men are included; the whole point of the WNBA is that, without it, there are no professional women in the sport.
In other words, it’s not the same job: one is an NBA player, the other a WNBA player. The WNBA exists precisely because women can’t do “the same job” but there is a market for watching women do the job. It’s just not as big as the market for people playing at the highest level of competition.
The reality is that if the market were bigger, they’d make more money. Help make the market bigger. Be the change you want to see in the world.