That isn’t actually true.
McCain for example was not born on American soil.
I forget the exact statutes or decision, but it has been determined children born in military hospitals on military bases on foreign soil are deemed “natural born” for purposes of citizenship. Perhaps someone here can remember the exact statute.