Earlier quoted context omitted.
China is likely considered by many to be a threat to democracy, which is part of the reasoning behind this
Great, but that doesn't answer my question: What authority does a US president have to tell a US-based software company to not distribute code from its US servers?
Well it has the authority that is backed up by both the most powerful economic nation, that has the most powerful military in the world, and which is the nation that contains many of the most valuable companies in the world, which will absolutely follow the orders of our judges.