Fraternity hazing was originally and still is intended to do this (though it is sometimes taken out of hand), force bonding in an expedited process through shared misery. A lot of the tools were derived from boot-camp and military training, where I believe there is some of that intention, as well.