DD8 did this too at that age. She also liked to write upside down and backwards at the same time. Her grandmother writes her letters that are upside down and backwards and she thought it was great so she taught herself to do it. Her preschool teacher promptly told us that we were not to allow her to do it because it would affect her ability to write properly and spell correctly! We got the same message from her 2nd grade teacher when she started writing her homework backwards or upside down or both when we weren't looking. (In reality, I saw the paper after she had gone to bed and felt that maybe it would send more of a message to her teacher than we had been able to get through. It didn't work and she was required to redo her work before it was accepted.)
She definitely did it out of boredom when she wanted to prove to someone she could do more than they were asking of her.