I see SQL questions with poorly formatted data edited often by others, especially from newbies who don't take the time or effort to format and/or learn the markdown. I have never seen the content changed, only the formatting. This includes not only the data, but the schema also: table & column names, relationships, etc. The same goes for SQL statements and even some code. If for some reason such an edit would substantially change the meaning of the data (which I've never seen), the original poster has opportunity to see it, correct and improve it. At the least they see a good example of how the data could and should be presented. (Of course one should be aware if the issue could be caused by typos and the like, and that editing could remove such important evidence. But as I said, I've never seen such a scenario or problem with good-faith edits.)
I'll admit that I don't think such edits should be made after others have already answered, or if the question is from high-rep user who should know better, or perhaps purposefully presented it in a certain way.
For very sloppy or confusing data, I usually kindly ask the OP in comments to reformat the data themselves before I'll contribute, especially if I see that the question is being downvoted. I personally won't take the time to clean up after someone else, but that's just my own principle that I expect new users to learn how to do it. If they don't comply, I might also vote it down and then move on.
Overall I don't agree with the apparent ethical concerns of others since 1) no sensitive data should be posted anyway, 2) technically code and text are just a form of "data" and they are editable, 3) by posting on Stack Exchange the OP essentially consents to releasing the data as part of the question and should expect that it's open for edit just as anything else, and 4) it goes along with the intent of SO to mutually improve the question to make it better for everyone. Any abusive edit would be apparent and would fall under the basic code of conduct (i.e. be nice and/or the new code they're developing) and could be handled in the normal fashion.