The other answer, by Mario, is close, but not quite on.
It's wanting to deny responsibility for one's actions. I saw this all the time when I worked in treatment. The teens I worked with would do something blatantly illegal and then blame the cops for catching them. While I was teaching, so the counseling end wasn't directly my job, I was still supposed to support the social workers, so I'd say, "Didn't you know what you were doing was illegal?" They'd have to say, "Yes," yet, instead, they'd always do a "Yes, but..." and rationalized it. Sometimes they'd say, "We weren't hurting anyone, so they didn't have to stop us..."
Adults do the same thing. Everyone sees him or herself as the measure of good in the Universe. We all see ourselves as doing what's right, and if it's not normally considered right, we rationalize it. ("I had to rob the bank. How else could I pay for my Lotus Esprit?" - And, yes, there are people on record with such attitudes.)
When one is caught doing something bad, which one knows they'll get in trouble for, a weaker or sick mind will try to rationalize it and say, "You made me do it," or put the blame on a third party.
It's just because the person is now caught and can't accept that they're the ones in the wrong.
In Psych 101 classes, you might hear it called denial with some projection.