If you look at revision 2 of this question, it looks as if I added a whole bunch of code to the question. I just tweaked the formatting at the top and removed a tag from the title. I definitely didn't add ~5000 characters of code.
I noticed the "an edit has been made to this post" bar just before I hit submit on my edit, so I believe that what happened is that the system helpfully merged my edit with another non-conflicting edit made by OP near the same time.
Also relevant may be that the post was probably still in the edit-grace period.
Can someone say what actually happened here?
If it's intended behaviour to merge edits from different users into a single revision, I'd suggest that (at least) edits by the OP should be separated. There's a huge difference between OP adding a lot of content to a question, and JoeRandomUser adding a lot of content to a question.