Why do we see in most organizations that there is no clear path of promotion for developers?
For example, I experienced that great devs got promoted to terrible managers, causing teams to fail later down the line.
Unfortunately this is a real thing and is referred to as the "Peter principle":
The Peter principle states that a person who is competent at a job will earn promotion to a more senior position which requires different skills. If the promoted person lacks the skills required for the new role, he or she will be incompetent at the new level, and will not be promoted again. If the person is competent in the new role, he or she will be promoted again, and will continue to be promoted until reaching a level at which he or she is incompetent.
Being incompetent, the individual will not qualify for promotion again, and so will remain stuck at that final level (termed "Final Placement" or "Peter's Plateau").
This outcome is inevitable, given enough time and assuming that there are enough positions in the hierarchy to which competent employees may be promoted. The "Peter Principle" is therefore expressed as: "In a hierarchy every employee tends to rise to his level of incompetence."
Why do technical people want to get promoted to a management function? Is management seen as superior to being a dev?