Because salt water freezes at a lower temperature than fresh water.
Observations from a ship which was near the Titanic when it sank suggest the water temperature that night was as low as -2.2C.
Fresh water freezes as 0C, but salt water freezes at a lower temperature because salt disrupts the freezing process. The more salt, the lower the freezing point (up until “saturation” after which salt begins to crystallise out of the solution).
Constant motion – such as waves and sea currents – also makes it harder for water to freeze.
So the water around the ship was not frozen solid.
The fatal iceberg came from Greenland and had been floating for more than a year before the Titanic hit it.
Just a week or two later, the last remains of the iceberg “disappeared into the Atlantic ocean”.