Yeah, in that regard he is a success. He has also inadvertently secured devo max. However, he is still a loser and it is an immutable law in human society that people won't follow losers. Sooner or later (most likely sooner) someon in his party would have started to ask why they were still following a proven loser and the knives would have been sharpened. Then the SNP would have got embroiled in a leadership crisis, which would have detracted from their success, take the focus off the gains made in the independence movement and quite possibly given Westminster a chance to slow down the transfer of power a wee bit. He could have stayed, but for the sake of his party and their goals, he had to stand down.