I’ve been asking myself the same thing for years. My take:
1. Peter Principle: people get promoted to their level of incompetence.
2. In many companies, it’s the only way to increase salary.
3. Some developers think it gives them more leverage or impact.
But honestly, most of the time it’s simpler: stakeholders want more output, and the best dev gets pushed into leading because there’s no one else.
It’s often less a “promotion” and more a gap the company needs to fill.