Jackie, forgive me for asking this, but...

There is a vulgar expression "crazier than a s***house rat" which I have heard occasionally. I wonder where does this come from? That is, I wonder why a rat in a latrine would suffer from mental disorder? I would think it would be quite content in such a place.