Yeah.
US also benefitted from being isolated from any threats by huge bodies of water, having a ton of cheap land, speaking english and being welcoming to immigrants. Thanks to this the whole global economy is tied to the dollar and runs through wall street.
And interestingly enough, in both China and the US, software professionals make a lot of money.