John Baez has had an interesting series of posts about this on G+, but IIRC the gist of it is that even though both Grigori Perelman and Yitang Zhang were somewhat outside the mainstream of academia, their work was not. Both of them built on well-known theories and methods to prove their groundbreaking theorems. Perelman's primary tool, for example, was Ricci flows, which had been used at least 25 years before his work. (I know even less about Zhang's work)