Is it charisma (whatever that means)? Is it vision? Is it luck and being at the right place at the right time? Is it a few devoted loyal programmers who spread the word about how amazing the Führer is?
I often think it also has to do with the person positioning himself/herself in crowds that appreciate/respect/value him/her. For instance, it's hard to imagine someone like Jobs at an Oracle-style corporation, or imagine Elon Musk running a bank. It seems like these types of people soon understand that certain groups match their "vibe" better, and it works as a positive feedback loop for them.