I don't think it's unreasonable for people to expect that they should be able to work in a field for the majority of their careers. Retraining is not an efficient use of ones productive years.
It's a different story, I guess, if you go into a completely different type of programming from what you're used to (say Web apps to embedded programming), but I don't think that's necessarily easy.
Important difference.
For example, at one extreme, all tech lasts exactly three years; at one of several other extremes, 50% of tech is eternal and the rest lasts exactly 1.5 years.