In very circular logic, title insurance protects your title.
There are a number of things that title insurance actually protects against. From a neighbour’s fence encroaching onto your property, to the seller not actually getting a permit to rewire the house, to there never being a building permit, title insurance protects you from things that happened before you bought that you would otherwise have no control over. More importantly, going forward, it protects you against fraud in case of someone impersonating you.
Title insurance is a one-time premium that lasts as long as you own the house, and is usually a very worthwhile product.