The Titanic did have watertight bulkheads, including some that extended above the waterline. However, the design and construction of these bulkheads were not sufficient to prevent the sinking of the ship. While the Titanic was equipped with 16 watertight compartments, they were only designed to be effective up to a certain height, and the compartments were not completely sealed off from each other at the top.
When the Titanic struck the iceberg on April 14, 1912, the force of the collision caused the ship's hull to buckle and the ice to puncture several compartments. Water began to flood into the compartments, and as the ship's bow dipped lower, the water spilled over the tops of the compartments and flooded adjacent compartments. This process, known as "flooding over," eventually caused the ship to sink.
The main issue was that the bulkheads did not extend high enough above the waterline to prevent water from spilling over. Additionally, there were several design flaws and factors that contributed to the sinking, such as the inadequate number of lifeboats, the speed at which the ship was traveling, and the fact that the watertight compartments did not extend all the way to the uppermost decks.
After the Titanic disaster, significant changes were made to shipbuilding regulations and safety measures. Today, ships are built with more advanced safety features, including higher and more extensive watertight bulkheads, improved lifeboat capacity, and better communication systems to ensure the safety of passengers in the event of an emergency.