I've been told it came directly from the post WW2 trials where a lot of the Nazis were defending their actions with "I was ordered to do it." And it is how we got our current decentralized command & control where the officers decide the What and the Enlisted/NCOs decide the How.
I dunno how accurate that is, but it seems reasonable to me.
YEah, you have to weigh that potential punishment against being held criminally responsible for what was done. You have only to look at history to see that. If you'd like a specific example; the guards at the Abu Ghraib facility back during the Bush 2 administration were criminally charged for what they were doing.
Since WW2, the US Military has stressed individual responsibility for following lawful and unlawful orders. The "I was just following orders" isn't a defense in the US.
So, as an example, if they're ordered to fire on American civilians, they have to decide to do it. If it's found to be a criminal action, they'll face the law regardless of who ordered them to do it.
Reminding a service member that their oath is to the Constitution and that they have the power (and expectation) to disobey an unlawful order is not sedition.
You're probably thinking of the Stop The Steal Rally in DC back in 2020 on January 6th. You know, when Trump said that Pence had to not certify the election and they had to fight like hell.