An accurate edit that explains the code in a code-only answer is great! Why on earth would you want to reject it?
People come here seeking answers, and a block of code with no explanation is not usually a very good answer. Such answers can be greatly improved by adding a bit of text explaining what the block of code does, so if such an edit is suggested I would definitely approve it providing I am reasonably certain that it is accurate (if not, I'd leave it for someone else with knowledge of that tag to evaluate it).
From the page about the Editing Privilege:
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
Edits like that improve our quality of answers, which makes Stack Overflow a better place.
Now as to your particular edit, it was probably done because there is a comment on the answer that said:
I appreciate that the Q asks for the shortest, but (for the benefit of
anyone else) perhaps you could elaborate your answer to explain what's
The OP of that answer hasn't been seen since June of last year, which was a few months before that comment was made, so some helpful person passing by probably thought they'd help future visitors by adding a description of what the code actually does.
I am disappointed that a moderator reverted the answer to remove the edit, as I think the edit made the answer much better, but I'm not about to get into an edit war over it.