Main income is advertisement on StackOverflow
Taken from Meta Stackexchange What is Stack Overflow's business model? copying the accepted answer:
Job listings (e.g. the traditional classified ad model)
CV Search (e.g. the new-fangled and IMO vastly superior dating model)
Traditional, but respectful (e.g. no animation or flash or pop-anything) display advertising on SO, SF, and to a lesser extent SU. http://stackexchange.com/about/contact
It's not difficult to do the math here yourself and estimate how much we are making. Also, remember half the team is remote, and does not live in NYC.
As you can see there is normal adverstising as you would expect it on every site that is not having you pay to be a member.
As a member of the network there is also traffic coming from our site to other sites on the network, such as SO, which is probably the main profit center of the SE network. I couldn't find data about WorldBuilding or other smaller sites on the network specifically.
You might also be interested in the Blog post How We Make Money at Stack Overflow: 2016 Edition which basically mentions the points above. Especially it states:
We’re a major website, and our ads solution is a major player in how we survive.
There are no donations
And about the donations:
Can I give a donation to Stack Exchange? is marked as a duplicate of How to contribute to Stack Overflow besides asking and answering? to which the accepted answer states:
Clean up other peoples contributions. Additionally, flag inappropriate postings, and vote to close/migrate questions when necessary.
Sporting your flair elsewhere brings more attention to SO as well.
So no donations as far as I am aware.
Not all smaller sites are part of the advertisement
Apparently not all smaller sites are part of the normal advertisement. As soon as they get big enough they seem to get added to a list of sites with normal advertisement. See We're enabling display ads on select Stack Exchange sites on Meta StackExchange for more information. Copying some parts from the linked question:
Without further ado, here's a list of sites that will soon be displaying excessively considerate, ludicrously on-topic advertisements:
On StackOverflow companies can sponsor tags that deal with their product. They get their logo as a little icon on the tag so that everyone visiting a question with the tag is reminded of the company. See What do icons on the tags mean?, copying from the accepted answer:
This is a sponsored tag - in other words, a company has decided to pay money to put an icon and to put links on the tag page. Moderators cannot edit these; they are only added as a result of a tag sponsorship.
The tag sponsorship program is currently active on Stack Overflow only.
Small sites are an investment
To summarize the comments under this answer and the question: small sites like WorldBuilding are probably seen as an investment. Setting up a small site when you've done this far more than a hundred times with sites that are multiple orders of magnitude bigger is pretty easy and thereby doesn't cost the company much. And running a small site is also pretty cheap. After all the content is provided by users and the moderators are volunteers. The community itself is mostly moderating itself. The costs of running WorldBuilding when also running StackOverflow are probably mostly negligible.
But if we all are lucky WorldBuilding helps provide traffic to SO and other bigger sites and one day it will be big enough to really cost something at which point it will also be big enough to help contribute to the advertisement network and thereby earn money for the StackExchange network.
Custom designs are probably the most important cost factor for sites like WorldBuilding and there is a chance that they migth one day generate ad revenue.