The jailer hates MM, and MM never does anything but make masks, so he thought they would have some fun. They bring her into his room and start raping her, and he just sits there making a mask. They are yelling at him the whole time while doing it. Then they start putting his masks on while doing it and he flips out.
The whole scene is pretty disturbing, and you never even find out if he kills the one guy or the girl. It was just to explain how he escaped. I think it was also more of them showing him kill people that deserve it, which I thought was a theme until he kills that girls parents.
I like that explanation of the escape better than the breaking the shackles scene...