When you take sworn enemies and put them together in a cloistered environment, provided the group is small enough, they experience the same events and develop similar attitudes, which gives them some common ground where previously there was none. It creates a ‘we’re all in this together’ mentality, a camaraderie.