You don't do it for the money. You do it for exposure. If you sell a short story that goes viral, you'll probably get a six-figure advance (which is not as much as it sounds like) on your next novel. That said, the odds aren't great; writing is about the worst way to make money imaginable, in part because either there's no barrier to entry (self-publishing) or there are barriers to entry but they're dysfunctional and political (traditional publishing) and no one knows what's seriously good until it's been around for ~20 years.
"For the exposure" is a dangerous path. That said, there are a ton of ways in which writing, especially non-fiction, can be a loss leader for consulting, a day job, etc. I suppose it sucks a bit for others trying to make that writing their day job but I'm hardly going to campaign for gatekeeping all public authorship to protect those in the club.