There is no rule preventing a woman from playing in the NBA. The NBA created the WNBA and has marketed it heavily in an attempt to get more women interested in the sport. Sure there’s a long term profit motive (more women watching basketball could make them some money) but the WNBA has operated at a loss for decades. But maybe next year will be the year it turns a profit!
Boycotting the WNBA doesn’t get women into the NBA, more the opposite. It’s just screwing over women basketball players because of false assumptions.