Easy for HN to do that. HN is not incentivized to make money. The people who run HN do not care if HN does not make any money. In fact, they have zero monetization strategies for HN.
HN has ads on its front page. Not many of them, and they are quite hard to spot at a glance (mixed in with the content, not clearly marked as such) but they're there.
AFAIK, the only ads are the ones described in the FAQ:
> A regular "Who Is Hiring?" thread appears on the first weekday of each month (or Jan 2). Most job ads are welcome there. Only an account called whoishiring is allowed to submit the thread itself. This prevents a race to post it first.
> Another kind of job ad is reserved for YC-funded startups. These appear on the front page, but are not stories: they have no vote arrows, points, or comments. They begin part-way down and fall steadily. Only one is on the front page at a time.
I'm not sure either of those qualify as ads in the sense we're talking about Reddit ads -- the first one doesn't bring in any revenue to HN (or cost "advertisers" any money); the second one seems like it's a perk for "graduating" YC and it's unclear whether it's something HN makes revenue from, either.
There's currently one on the frontpage for GiveCampus, shown below a regular story:
14. The Haunted House – Privacy on Google Street View (harpers.org)
8 points by b0b10101 1 hour ago | flag | hide | 1 comment
15. GiveCampus (YC S15) hiring Sr Engineers who care about education (lever.co)
1 hour ago | hide
Distinctive features: no upvote button, no point value, no flag link, no comments.
Right, I included the Haunted House entry (a regular story) for contrast.
The job posting is certainly "sponsored content", a privileged post put there at the behest of a third party, which blends in fairly well with neighboring posts yet isn't subject to the normal rules. I don't know if money actually changes hands to put it there (maybe each YC company is granted a posting there, or maybe they have to pay for it), but in other respects it's straightforwardly an ad for a job.
All that said, I have no problem with it being there.