Many reported reasons lead to losing the job, not just lack of promotion. The glaring reasons I have seen repeatedly throughout decades of clients that keep jobs longer-term without being promoted are:
1) Ability. Person is very good at the job and a superior depends on this person, but does not give adequate pay raises - AND does not want to train a replacement, so does not promote the person. Person quits or retires and company must hire two people to do the job.
2) Failure to keep up with new technology and education. In some companies, Millennials who own multiple devices, use them at work, and use all the tech at work as well are promoted first, over older people who do not use the tech or increase education by ongoing professional development that is often free, sometimes offered at work.
3) Aging and/or Personal Presentation- See #2 above. Also, "old" stodgy attitudes, lack of flexibility, an "older" less attractive appearance, weight gain toward obesity, bad dental work, un-stylish clothing, poor posture, too casual an attitude, etc. - specific deficits depend on the workplace. It may be an illegal reason, but still the reason.
4) Doing enough work to "get by", but using o initiative or energy. The person does the job, not outstandingly, and it still will cost more to train a replacement than to keep the semi-slacker. (see #1)
5) Diversity - Sometimes a minority/physically challenged/female/other gender/other is purposely promoted for that demographic, sometimes is held back from promotion because of it, and in some workplaces, is treated equally as well/poorly as the majority.