When people are down on their luck, they also aren't at their best as a person. So maybe she was trying to get the judge to like her a little bit?
It's gotta be tough to be a judge...I couldn't have kept a straight face after randomly getting flashed in court, there's no way! And all that came out of his mouth was a smirk! It seems like he rolled with it though, he probably could've given her more jail time because of the stunt.