This is a product of various reasons that are academic, economic, legal and institutional:
In many jurisdictions, it's easier and cheaper to remove staff at the end of a fixed contract: it can be very very expensive to remove staff on a permanent contract.
Enough able people are willing to work on fixed contracts that universities don't need to offer permanent contracts for every post.
Track record, CV and references are not enough to tell how good someone really is, nor how productive they'll be in your team; that needs an extended probation, which a fixed-term contract effectively functions as.
Funding tends to come in bursts, with no guarantee of follow-up funding; so while it can be possible to ensure a post can be funded for 6 months or 5 years, at the end of the funding, there may not be the money to fund that post. On a permanent contract, the resulting severance can be very expensive for the university. The fixed contract gives clarity to both employer and employee.
Productivity changes over time. Some employees are more productive when they have a lot of job security; others are more productive when their future employment depends on the current performance. I'd love to see some studies on the impact on productivity of needing to repeatedly apply for funding: oddly, it seems to be one area where we academics don't take a scientific approach to analysing!