"Britain could have stayed out" It was Britain that declared war, in order to preserve its empire. It didn't pimp its army out as latter day Venetian or Hessian Mercenaries, it fought for its own interests.

The relationship with the EU is contractual - the UK signed treaties and took on commitments, that were ratified through Parliament. The UK used to pride itself on its integrity - Pactum Meum Dictum. Guess that doesn't apply when it comes to actually meeting your commitments.