Regulations and codes tend to be minimum standards (or, in some cases, nothing more than make-work for unions). What prevented the White Star Line from making a few calculations of their own, and adding more lifeboats above and beyond what was regulated?
They did in fact exceed the regulations. It still wasn’t enough. After the tragedy Cunard, the Hamburg Line, etc all had to retrofit their ships. Again the takeaway should be that government regulations are no guarantee of safety. In the modern world they only guarantee insanity.