Moderators have no restriction on edits that they can make. There is no technical reason that it would have had to go through a review, or be accepted. Additionally, there is no minimum edit restriction either, like there are for other users.
So, aside from technical reasons to restrict the edit, was it a good one?
I believe so, there was a spelling/typo error that was corrected, there was redundant use of "The code:" (when it was obvious that there was code after that), and then there were multiple paragraphs merged in to a simpler description.
So, the edits improved your post.
We encourage all edits to improve posts, and this is a Stack Exchange thing:
Edits that make improvements to questions are encouraged.
Note that, with the editing privilege, there's the following:
When should I edit posts?
Any time you feel you can make the post better, and are inclined to do
so. Editing is encouraged!
Some common reasons to edit are:
- to fix grammatical or spelling mistakes
- to clarify the meaning of a post without changing it
- to correct minor mistakes or add addendums / updates as the post ages
- to add related resources or hyperlinks
Try to make the post substantively better when you edit, not just
change a single character. Tiny, trivial edits are discouraged.
^^ Bold is my emphasis. About the footnote "...make the post substantively better...", fixing a typo is substantive enough on Code Review.