Call it a "shounen asspull"or what not, it still made sense lore-wise, unlike many others that purely relied on the "bonds of friendship" to not only, fully revitalizing a nearly-dead character but also endowing them with the notorious "plot armour". If you wish to view everything as a convenient "plot device", by all means stop reading, you'll drown yourself in boredom and drag people along with you anyway.