You're making the somewhat naïve assumption that the political class learn from their mistakes. People in politics have agendas and egos and they tend to put these before the greater good.
Had Gordon Brown been less full of himself, he'd have recognised he was totally the wrong person to lead the Labour Party and be an effective PM after Blair stood down. But all he was focused on was getting the top job he believed he was entitled to and not many had the guts to tell him he was the wrong person because it would have impacted their own individual careers when he won. It's a sort of cross between group think and game theory.
So having elected one person who was both temperamentally unsuited to the role and an electoral liability to boot with the charisma of an over-boiled potato, they then should have elected David Miliband. Yet they elected a man with even less charisma and completely unsuited to be a leader. And when he stood down, having lost an election that the Labour Party should really have won, they chose someone even worse than Ed, with far less charisma and not a clue.