They would've been better off if they could have set up an agreement with the EU, but they didn't get one that satisfied all parties - plus they had a weak negotiating position.
It was particularly weakened by obvious issues with the UK's political leadership - the EU knew that the UK didn't know what it really wanted and didn't have negotiators with the mandate to get it.