There are so many elements here that I feel people miss – or refuse to understand – about coups.
For example, none of what the South Korean president did was legal. But that alone would not have stopped the coup.
If people just waited, twiddled their thumbs, and thoughtfully commented how "this is illegal", the coup could have probably succeeded.