For reasons previously unbeknownst to me, the same keyboard shortcut that you use to format unformatted code as Markdown code blocks (Ctrl+K) can also be used to reduce the indentation of code blocks that have too much indentation — four spaces a punch. Once it is no longer possible to remove four spaces leading each line, the shortcut then alternates between removing and adding four spaces.
I've been using this same keyboard shortcut for years to perform similar edits on numerous posts, but I never understood why it worked, and I don't think it ever would have occurred to me if it weren't for the fact that I discovered it entirely by accident. So I don't blame you for not realizing this.
But now that I think about it, I understand why it works this way: as long as every line in the selection contains four leading spaces, the Markdown parser considers the selection to be a code block. So the editor also treats it as a code block, and the shortcut (or the "Code Sample" icon in the editor UI) removes the spaces in an attempt to convert it back to plain text — except in the case of excess indentation all you get is another code block, albeit with less indentation. Repeating the same shortcut causes the editor to keep removing four spaces until it is no longer possible to do so, by which time the selection is no longer a proper Markdown code block.
Note that this will not work on code that is indented with tabs — it only adds and removes spaces in groups of four, or if the indentation is all tabs then it behaves exactly as though the tabs were a part of the code, not whitespace.