Why would one purchase liability insurance?

Liability insurance is purchased to protect oneself from the risk of liabilities that are a result of a lawsuit. It its prominently used in car insurance, but can also be purchased for products, and by employers.