It's a social network. Logged-in users see ads on their dashboard (activity feed), which makes up most of Tumblr's traffic.
If you're only ever viewing Tumblr "pages" from the public blog network and without an account, you have never really interacted with the majority of the product. It would be like if your only experience with Facebook was viewing businesses' public Pages without an account, and then wondering what their business model is because there's no ads on FB Pages.
Your point of confusion is a common one though, which really speaks to Tumblr's biggest marketing failure. Sadly, it also indicates that those login walls/nags on Facebook, Instagram, LinkedIn, Pinterest, Reddit, etc are actually somehow necessary for people to grok a social product that has a public-facing component.