As a freelancer, you're hired by businesses for your particular set of skills, experience and professional advice. If you, in the performance of your expertise for a business, make an error or mistake that has a negative effect on that business, a claim could be made against you and you could be held liable. A costly claim can be the difference between you being able to continue freelancing in future or being shut down.
Even if your contract with a business has ended or you have closed your own business, claims for previous work you've done can still be made against you and you can still be held liable for them. That's why it can be important to have the relevant insurances in place at all times.