These are typical drywall boxes (sectional view), except the top one with extra wiring space is rather rare.
Renosteinke, have you worked here as you know so much? I have by the way never experienced a whole box pulled out of the wall even when tripping over a plugged cable. It can happen that you pull the outlet itself out though, if its not properly secured to the box.