Why do departments fund PhD students instead of postdocs?
"I'm dismissing the altruistic reason"


Therein lies one of the biggest problems with your question. I work for a land-grant state university in the U.S. Our mission includes education. It's not an altruistic reason, it's literally why we exist.

The other flaw in your question is assuming that the money to hire these two groups is fungible - it isn't always. For example, there are grant programs where education of graduate students is a major component of what one is supposed to be doing - "we're going to hire a postdoc" is simply a non-alloweable use of funding.

There are some other nice features of graduate students to consider as well:


They're cheaper. While a postdoc is probably more value for complex activities, there are sometimes things that require some expertise, but not a full-blown PhDs worth. Masters and early-stage PhD students are excellent people to conduct literature reviews, field collection, etc.
You can identify promising researchers early. Lets say you see someone in undergraduate courses whose impressed you. If you only recruited postdocs, you're essentially saying "Look me up in 6 to 8 years, I'd love to work with you." If you recruit graduate students, you can usher them into their research career.
You get them for longer. Postdocs are (by and large) transient positions, and much of their time may be taken up by looking (rightly) for another position. In many labs, especially those without long-term technicians, graduate students may actually have more institutional knowledge.