Many people I have met had an excellent career, after turning 40 they lost their job for some arbitrary reason, and to their utter surprise found it hard or impossible to find a new one.
I have a theory about why this happens, based on my experience in the software industry.
A manager hires some young person from school. He is assigned work using some new technology, something the company did not do before.
The company can sell his services, they employ someone more to work on the same task, and select someone the first person can teach how to do the job, someone suitable to work under this first person.
Some years later the first person is a group manager. After some more years he is 30 and department manager with 60 subordinates, all under 30.
When someone is recruited there is usually more than one person immediately involved. It could be the line manager, a person in the HR department and one or more workmates.
Each person involved has two interests in mind, the company interest of hiring a competent person and the personal interest of not hiring anyone who could take a position over him on the social ladder or who could ever pass him. Each person is going to serve the company interest as much as he must and his own as much as he can.
Usually they all have to agree on an applicant or someone else is chosen.
As a result, the person hired is usually “smaller” than everyone involved in the recruitment process. Younger, less intelligent, less experienced, less educated and less socially competent.
Age discrimination is not primarily about age, it is about power, according to my theory. Power that could be used to move up the social ladder and move up in the company hierarchy.
Age is involved because, from what I think, age is important in the unconscious calculation we do in our minds to determine who has power in a group.
If we have a high rate of change and a habit to assign new tasks to inexperienced people it could explain this problem of finding work when you passed 40. There is still work using older technologies but personnel requirements are going down.
According to my experience, in companies with high hierarchies, since everyone has to be “smaller” than his immediate superior, the incompetence requirements at the bottom of the pyramid is often so high that the people hired are not able to do the job. The company hires contractors to do the actual job.
Many of the people who can not find employment can get work as contractors. Sometimes these contractors work for years for the same company at very high cost. Still the company does not want to have them as employees.
As contractors they have a code of conduct. They are supposed to just do their job. They are not supposed to build relations which would give them power unrelated to this job. If they do their contract can be immediately terminated.
As contractors they compete with bigger companies which mainly hire young people. In periods of lower demand the bigger companies get most contracts and it is hard for small companies with one or a few contractors to get contracts. When a contractor has been out of contracts for half a year or more, it is often difficult to find a contract again.