story
E.g. from the court's opinion:
> Whenever the President and Vice President discuss their official re- sponsibilities, they engage in official conduct.
It's not a huge leap to infer that the President, as Commander in Chief, is engaging in official conduct any time they ask the army (or its many contractors) to do something.
The only thing the Constitution says is:
> The President shall be Commander in Chief of the Army and Navy of the United States, and of the Militia of the several States, when called into the actual Service of the United States
There's nothing in there that says they can't be used domestically, or for what purposes the President can control them. There could be some quibbling about what "actual Service" means, but I suspect it becomes recursive to "whatever the president says actual Service is".
The specific reason that everyone is freaking out is this part of the opinion:
> In dividing official from unofficial conduct, courts may not inquire into the President’s motives. Such a “highly intrusive” inquiry would risk exposing even the most obvious instances of official conduct to ju- dicial examination on the mere allegation of improper purpose.
I.e. the president's motive is unquestionable, the only question is whether the action was taken via some power granted to the President. If it is, the President has immunity, and the president has _very_ broad powers.