People through various means ranging from tradition to culture to watchability in bars to whims of a leader settle on a few mainstream sports.
Then, based on a million factors such as how many people watch it in which countries via which medium, whether you can squeeze in commercials during competition, whether there is a "player union" and how much sports-related accessories cost, you get paid a certain amount.
If more people watched WNBA than NBA, WNBA players would probably get paid more than NBA players even though the competition level is higher in NBA.