Why would a professor (say in pure math) want to take PhD students?
They get to train the next generation of mathematicians. They get to establish a relationship with young students, guide new researchers when they are up-and-coming and those people become their students. For the rest of time those researchers will be the person trained by Professor Stella and that is intrinsically valuable for several reasons:
- Some people like teaching. I love teaching, and if I leave industry and go into university research it will be largely because I want to teach. The ability to work with and mould young minds really appeals to me, and I get value out of knowing that I've helped people learn.
- You develop an attachment, and a sense of pride, in your students. Their accomplishments become, not quite yours, but close to feeling like yours. If you’ve ever served as a TA, you’ve probably worked for a long period of time with a struggling student. Maybe you felt a twinge of pride when they finally got it, or got a good grade on an exam. When you’re an advisor, you get a lot more than a twinge.
- They are part of your legacy. They will tell stories about being your student for another 20+ years after you pass away, they will toast you at banquets in their honor and thank you for making them the researcher that they are today.
What a professor expects of you is that you try your very best to be a good scientist, that you do interesting work, and that you continue to carry on the torch of mathematics for another generation after they are gone.
In addition to the points @StellaBiderman gives, oftentimes PhD students can actually be useful collaborators, not just students.
Yes, the professor will be far more advanced in terms of experience, but a good graduate student is more useful than for just the clerical work you seem to have in mind. Guided well, the student can help explore a research topic and may occasionally have insights or perspective that the professor might otherwise overlook.
This is particularly true for professors who tend to work on many projects at once. They take a managerial role and guide different research projects simultaneously while the students they mentoring focus solely on one of these projects and do much of the legwork.
In order for this sort of relationship to work well, the student will generally be beyond their first year and has a good degree of independence and self-motivation
Because it's fun? Professors in pure mathematics love mathematics. Working with bright, enthusiastic students who are starting to engage in mathematical research is the sort of thing that someone who loves mathematics would naturally love to do. Your question assumes that this is something hard to explain. I don't see why. There may be exceptions of course, but most advisors enjoy such work.