Well, I'm a German professor in CS - my answer is biased by those facts. Some might be generalized, though. Some answers are based on German employment rules in the public sector and those will most likely be specific to Germany.
Usually, contracts in the public sector are either permanent (hooray!) or temporary positions. We have a law stating (simplified version) that you are not allowed to be employed more than 12 years in temporary contracts (if you want to know more look for the "Wissenschaftszeitvertragsgesetz" - we love those words!)
Another rule is, that for "permanent tasks" you should have a permanent position whilst for temporary / project-style jobs you can hire people in temporary positions.
To make things even more complicated: A university / department usually has both types of positions and can distribute them among researchers and central administration.
If the university does not have enough positions available, you have to acquire third party funding. This is by definition project related and therefore temporary.
This brings me to the following:
- In general, I would love to have research staff - but resources are limited and usually you don't have too many available.
- If I acquire third party funding, it is just available during the project duration - in good cases this is long enough for a PhD candidate to finish a PhD thesis (in the field of the project).
- If the project ends without the PhD candidate being finished, I usually try to apply for a follow-up project which helps funding the candidate. Since I want successful PhDs afterwards, this is a top priority - and induces some stress on professors.
- Yes, I could hire someone without intention to do a PhD or even a postdoc, but at least in CS industry is paying that much better, that the possible PhD is the only chance to motivate highly skilled people for this salary (which is ok, but less than in industry).
- This brings me to the last point: Motivation! A PhD candidate is not only interested in the project but in his/her PhD as well. So they are usually quite motivated and it is more fun to work with motivated people.
Things are a bit different if you are in a graduate program, but most of what I wrote above still applies.
To add a few words on the comment of Monika:
- At least in Germany you cannot fire a PhD student at any time since you are usually having a labour contract.
- I agree that there might be strong tensions when a permanent position becomes available and it is open who might get it. But permanent positions in research are quite rare nowadays in Germany so it does not happen that often.
Added after OPs remark:
In fact the situation for postdocs is or less the same: Usually you don't have the funding to support a postdoc for a longer period of time. With this, it is questionable why a postdoc would like to work in such an environment. Doing a habilitation / postdoc-phase and preparing for a full professorship could be a very good motivation as well. The tasks for a postdoc are usually different from the ones for PhD candidates: As postdoc, you want to demonstrate that you are capable of running a group - which involves writing grants, guiding PhD candidates, involvement in teaching, etc. Depending on your field it allows you to do original independent research for the first time (e.g. in medicine in Germany). So if you are looking for such a person in your group, a postdoc is great, but usually most funding schemes are more hands on and so it is difficult to get funding for a postdoc, unless you are having very large funding schemes.