Liability insurance has as much to with safety as an umbrella on a windy day has to do with staying dry.
True. Liability insurance serves to make sure that third-parties injuries are paid for by the party responsible for causing them, rather than the injured party or society as a whole.
From a law and economic point of view, liability insurance is the most efficient way to handle injuries to third parties.