I think it would be due to the fact that an untidy paper is hard to read and it looks unappealing to them. I was one of the students who use to decorate her paper well and used to get praised for it. One of my teachers said this is the standard of writing a paper. She said it took a lot of time to read the untidy paper and frustrated her. She was also an OCD and said it gave her anxiety. So, maybe teachers have a point.
By the way, if you have OCD or similar disorders, please check this article to read some of the cures for it. 🙂