Science is an apprentice system. Your Ph.D. is your apprenticeship, followed by a post-doc in a different place for a few years to make connections and work independently. After which you get a "tenure track" (to take the US term) job that eventually leads to a full-time position as a lecturer or even a tenured professor or PI.
But there are far more qualified people today than there are positions. That two-year post-doc can now be a decade or more of temporary research jobs. The vast majority of PhD:s will never get a full-time position anywhere. Of course, not everybody enjoys teaching, and a tenured research position is a high-stress job similar to starting, funding and running your own research company. Most young researchers eventually leave for a career in industry or government.
I've had six jobs at four places1 so far, and there is no full-time position in sight. I'm pretty gruntled2 though, and the situation is a deliberate choice on our part. I have neither the interest nor capability to become a PI, and I lack the teaching experience and the Japanese I'd need to be a lecturer. Instead we figure I'll continue to work on research projects for as long as it is fun and as long as I can find new projects to join.
Once I no longer want or can find new research jobs I'll look for something else. But until then I'm quite happy doing what I do, and I hope I'll be able to for the next ten years as well.