Marissa Mayer – the CEO of Yahoo, which was just bought for $4.8 billion by Verizon – recently expressed her frustration with how the media consistently covers her as a woman CEO, rather than just a CEO of a major tech company. During her 4-year tenure at the helm of Yahoo, she became known for her short maternity leaves and office nursery as much as for any actual business decisions she made for Yahoo.

Mayer certainly has a point – the press does treat women in leadership positions differently than men. Yet the sexist treatment is a double-edge sword: Yes, the media paid particular attention to her appearance, personal life, pregnancies and parenting decisions, but they also paid much more attention to her overall than they would have if she had been a man.

After all, Marissa Mayer is pretty much a household name. How many other CEOs of Fortune 500 companies can people name? The answer for most of us is very few. And with Yahoo clocking in at 513 on Fortune’s latest list, that means there are many CEOs, including hundreds at much larger companies, who aren’t being covered much at all. Perhaps Mayer would have welcomed a little more anonymity, but fame has its upsides. Mayer apparently will receive a rather generous severance package of $57 million if Verizon decides to let her go. But if she feels like this isn’t enough, her fame means that she will have other ample money-making opportunities as a speaker and in other public roles capitalizing on her name, as well as any future job as a leading tech professional.

This is a point to keep in mind as we watch coverage of Hillary Clinton’s nomination and run for the White House. There is always a lot of handwringing about how the press treats female candidates differently than men, not only in focusing on looks and family but in describing their behaviors and manners. Women’s voices may be interpreted as shrill or ditzy, and their behavior as either too emotional or too icy. And sometimes treatment is truly unfair and reeks of sexism.

Yet women like Hillary Clinton also get big benefits from their gender too. In fact, one of the main reasons Democrats wanted Hillary Clinton as their candidate is because of the belief that it’s important and appealing to put the first woman in the White House. Her primary campaign had a notoriously hard time generating much enthusiasm, but to the extent that she did have fervent backers, they were overwhelmingly from the Left’s feminist movement and from organizations specifically focused on electing women. If Clinton was simply a former Senator and Secretary of State–with a lackluster record of achievement, scandal-plagued past, and poor campaigning skills—and not also the first woman running for the presidency, she would at a minimum have had a lot more competitors for her party’s nomination, and likely would have been an early also-ran.

It may not be fair that women enjoy these benefits and have to pay the costs associated with their sex when they enter the public eye, but it’s also not simply a sexist plot.  The fact that there are few women CEOs and fewer women running for high office means that the ones who are doing these things are more interesting and newsworthy to the public. Mayer was frustrated with the attention given to her pregnancies, but let’s face it: having a new baby when you are a woman is different than when you are a man (to state the obvious). No one is terribly interested about how much leave a male CEO took after his wife gave birth, but Mayer’s situation was fascinating for all of us women who have been through our own birthing experiences or who imagine heading down that path one day. She only took two weeks off? Wow. Women were endlessly interested in debating if this was a show of women’s strength and dedication, or a terrible precedent in creating expectations for bouncing back after a birth.

One Huffington Post story on Mayer cited as evidence of sexist coverage a debate about whether Mayer’s pregnancy discouraged her company from firing her. Yet as anyone in management knows, this is a legitimate issue. Some companies treat pregnant women badly, which is why there are laws on the books to protect them from discrimination. But those same laws mean that when a woman is pregnant, her supervisors are aware that there is a heightened potential for litigation and charges of discrimination, so of course this can play a role in decisions about termination.

Recognizing that someone’s sex brings both benefits and drawbacks isn’t sexist, and it doesn’t excuse treatment that is out of bounds. But it’s important to recognize that the world is more complicated than the simple charge of “sexism” implies.