The simplest case to be clear on is that a single longitudinal bulkhead down the centre of the ship, as the City of New York/Paris ships had, is almost certainly bad. It leaves the possibility of a significant length of the ship being flooded only on one side - quite probably causing the vessel to capsize.
Even without longitudinal bulkheads, extremely large inflows of water can cause this if a number of transverse compartments are open at once, because the "permeability" of the internal contents (i.e. all the cargo, non-watertight bulkheads, etc.) is low enough that water mostly fills in near the hull, not the centre. This was noted in the WW I sinkings of both of the Lusitania and Brittanic, which did not have longitudinal bulkheads, but did have massive holes opened in them. Neither capsized, but both listed so heavily that water poured in through portholes, speeding their ends.
The lack of a central longitudinal bulkhead in Titanic's group of White Star's liners is known to be deliberate, for the reason of flooded stability.
Multiple longitudinal bulkheads - in particular, those only a few metres inside the hull, as is common on military ships, obviously leave less volume to fill. The design does still appear, and presumably the designers, today empowered by sophisticated simulation software, are confident that the benefit of the greater subdivision well exceeds the possibility of dangerous listing. (I am indebted to conversations with a number of participants of the 69th Shock & Vibration Symposium for clearing this up for me).
Modern design texts - and registration requirements - essentially demand that simulation and analysis of damaged stability of a proposed ship be done in a variety of conceivable scenarios. In theory, this allows us to have a rationale for resolving the safety/money tension between features that are engineer's comforts and real needs.
The war between money and safety never stops, however; even when designs are safe, maintenance and worn-out ships become the next battleground. Thanks to Roy Mengot for passing to me the web site about the MV Derbyshire a bulk carrier lost in 1980 with 44 lives. The story has become the focus-point for those concerned about the safety record of bulk carrier ships, of which 149 were lost between 1980 and 1994, with the loss of 1144 lives.
As stated, I make no claims to be an expert in naval architecture, but I think my main thesis remains sound as long as there were engineers at the time who would have designed the Titanic class more conservatively had their management given them a higher budget.