Being in the right place at the right time.
It is a delightful bit of luck that Steve Jobs made it back to Apple. That scenario could have been way different where Apple bought BeOS, and Steve Jobs didn't return to Apple.
If Jobs isn't at Apple, he doesn't have the opportunity or resources to make his vision for the iMac, iBook, iPod, iTunes, iPhone, or iPad a real thing. In fact, he probably wouldn't have had the reason to envision any of the things at NEXT.
Also, you could argue that Jobs being at Apple when ARM got good enough for mass market smart gadgets at scale played into it too. If the tech isn't quite there, it doesn't look as interesting at all.
Without the right tech being available, Apple stalls out at the iMac and Power Mac and so on and is a profitable computer vendor, but not the most valuable company in the world.
So, Tim Cook might not be as visionary, but it might also be a poor time for anyone to be CEO as the opportunities shifted.