I had a female cat that did this and it was in fact from a bladder infection. When it first started, we thought it was behavioral because she did it ALL OVER the house...not in the same spot but later when the stains were tinted red I knew something was wrong. Unfortunately, after she had sprayed all over the house, she would go back to those spots sometimes even after the UTI was gone. As far as "why" they do it..simple. The vet said that when she would go in the box, it would hurt, so she tried some place new....then some place new, etc. Bottom line, take her to the vet right away just to be on the safe side. Good luck!