Taking out travel insurance before you go abroad is not a legal requirement, although some tour operators may insist that you have evidence of a valid travel insurance policy.
However, it does protect you against medical treatment costs which are much higher than we pay in the UK, as well as providing cancellation cover, and other benefits. Not to mention the peace of mind knowing you are covered against the unexpected whilst abroad.