This looks interesting too, stubbornstains:
Passenger ships and the SOLAS Convention
"There are two naval architectural principles applied to passenger ships under SOLAS.
The first is that of the margin line, an imaginary line up to which the watertight bulkheads must extend, so that if the prescribed number of watertight compartments are flooded, water will not flow over the top of the bulkhead into the adjacent dry compartment. The margin line the margin of safety.
The second principle is that passenger ships, if they are going to sink, do so on an even keel. To achieve this, they are fitted with cross-flooding valves to equalise list.
Costa Concordia suffered huge damage as a consequence of the grounding - the rock embedded in the ship's port side is evidence of this. To have sunk means that more than the 'survivable' number of compartments were breached and the margin line was submerged. To have listed to starboard means she became unstable as she sank, which is not what she was designed to do.
No passenger ship the size of Costa Concordia has ever sunk. The Antipodean Mariner speculates that the investigation will focus on why she rolled over and what the impact of an open water sinking could have on the fleet of super-cruise ships in service. The loss of life is tragic, but thousands may have died if Costa Concordia had not rolled on to an island outcrop."
So in other words, there's an engineering flaw at work and they are very lucky the death toll wasn't in the thousands :(