Well I can only assume that when UK departed the EU, English wasn't removed automatically even though no country remaining in the EU nominates it as their official language of choice.
The UK was not a founding member of the EEC which preceded it, I don't know and haven't easily been able to find out, but it wouldn't be that surprising if the European Parliament already used English as a common language for policy etc.
(In fact to strengthen that probability, if it had been say French, when and why would it have switched go English? Just because the UK joined?)