A number of reasons, but the three main ones are that there is an increasing pace of churn in terms of companies, so the idea that a company will be around for 40-50 years is naive in my opinion. Indeed, just 30 of the firms in the original FTSE 100 in 1984 are still operating. Maybe in the civil service, there is a certain inoculation from that, but for many people that is the reality.Why? There were a lot of benefits to having a career in one field (or even with one company) - loyalty for a start, the quality of the training, increased expertise, stability (for the employees and management) etc.
Binning it off for in order to make most of the private sector face a succession of McJobs wasn’t in anyone’s interest, except the same short-termist cretins that have caused loads of damage elsewhere.
Secondly, skill requirements are changing at a tremendous pace, such that many of the jobs that young people do today don't exist when they graduate. It's possible that this will mean minor adjustments to your skills but it's also quite possible that fundamental reskilling will be required.
Thirdly, we're all living longer (Covid aside), so the notion of studying, then working, then retiring is an outdated mental model.