I think that there are a few obstacles. I think the biggest one, of course, is job security. It's very difficult to continue through all of your 20s and 30s on one- and two-year contracts, not knowing where you'll be or what you'll be doing in a few years.
There's a constant interest in alternative career paths, which can have great benefits for the rest of the economy. Skilled talent is needed, not just in academia but also in business and industry. For a lot of young researchers, that is a very difficult thing and a constant source of anxiety. Job availability is a big one.
Watching all of your non-academic friends and acquaintances be able to settle down, buy houses, have families and things like that is quite difficult for a lot of young researchers. That's one of the push factors that I think keeps people leaving academia and research.