The theory is that there was an older and more advanced civilisation that built them using more advanced techniques which are now lost.
And the Inca inherited pre-existing structures.
The Inca did do stonework of their own, but not close to the standard exhibited in this article.