It's a private venture of Y Combinator company. Why do you think it needs any
earnings?
How are the moderators compensated? There are no ads or anything on HN.
Even if it was just a simple hobby site by PG and it actually cost him a non-trivial amount of money to run/maintain, he is still doing it. He likes his hobby so he takes money from his job/investments and spends it on his hobby. Just like you when you buy your computer game, how are you affording it?