Quite often great accomplishments are the result of a lot of hard work.
But lots of hard work alone does not explain why one person who put in a lot of hard work will greatly outshine many others who also put in a lot of hard work.
Nor does it explain phenomena like prodigies, who excel at a really young age, with far fewer years of effort than many others.
Finally, creativity and inspiration often play great roles in mathematical and other endeavors. They can't entirely be explained by hard work or dedication, which are often prerequisites for intense creative efforts but aren't all there is to it.
Feynman was a genius, but he dissects his own accomplishments and you can see how if you only knew this, this, this, and that, plus a few different methods of integration, it would have seemed obvious to you too.
tl;dr we do our heroes a disservice when we hold them in too high esteem, because we discount their very human, and very costly, accomplishments.