There is a lot of truth in this, but especially when developers are semi-randomly promoted into leadership roles, they should be given enough time (and mentorship) to learn from their own mistakes. Some will learn very quickly (those with enough emotional intelligence), and some will learn nothing no matter how much time you give them. Being a good manager with formidable leadership skills is something you can only get through experience.