Islam does not tell you to do this. It's the cultural practises of specific kinship networks in the UK, especially from Mirpur. And the practise is also currently on the decline.
The irony is, of course, that this law is being proposed while the NHS has been advised (by a quango, not the government) to stop discouraging cousin-marriage: https://www.thetimes.com/uk/healthcare/article/first-cousin-... -- the NHS is not required to accept this advice, and indeed the links above show that cosanguinity is decreasing, partly because of public health initiatives telling people what the harms are!