When I post code, I deliberately format it the way I want it to appear. Sometimes someone comes and edits my post just to change the source code formatting style to suit their preferences (e.g. for use of whitespace). I don't care for that.
A big part of the incentive for me to post here is to demonstrate my knowledge and get credit for it. Source code formatting is important to me, and since people will draw conclusions about my skills and style from looking at my posts, I want the code in my posts to show my style. So it annoys me when someone reformats my code (if I thought it was an improvement, that'd be one thing, but I'm talking about cases where I prefer the original). (I know people could see how I originally posted it if they looked at the revision history, but how often is anyone going to do that?)
I'm not in the habit of editing code in the posts of other knowledgeable users just to conform to my own style preferences, but when I include code in my posts I certainly want it to convey my style preferences. I'm not only showing how I do it, I'm advocating that style and suggesting it to those who see it. When I'm answering a question, it's part of the information / advice I'm offering.
When I copy a code example from someone else's post, modify it, and include it in my post, I often reformat the version in my post according to my preferences, for the reasons mentioned here. But that's a big difference from changing it in the original post. When someone who knows what they're doing posts code, if it's fair game for anyone to edit it (in the actual post) just to conform to their style preferences, where would it end? If people edit my posts to conform to their preferences, and I were to edit theirs to conform to mine, what sense would that make?
What is the etiquette on this? Is there any mechanism for rejecting edits to your own posts? When this happens, should I just feel free to go back and revert the post to my version?