Hot water rain

Had a corroded water pipe burst today at home. Its the little jumper pipe connecting the water heater to the shower. On first inspection, looks like the hot water has somehow corroded the connectors (made of metal that looks like steel). Managed to buy a replacement flexible pipe (less than 1ft long) but will have to investigate if this is becuase of wrongly spec'ed pipes or just that the old pipe came from a bad batch. For a while yesterday my entire bathroom was flooded with hot water. Had to fight thru the hot water rain (since its installed on the ceilling) to get to the main water pipe to turn off the water flow.