You can rent geographic and non-geographic numbers and set them up to dial to anywhere in the world, mobile or landline and to the end user the geographic numbers could start with your local town dialing code.
The clue is the first couple of numbers after the std code as resellers will have their own range of numbers.
There's nothing illegal about reselling geographic numbers, or even using them, a lot of businesses do so, however it doesn't stop the scammers from pretending to be something they're not.
If they were to be really clever they'd use Leeds, Cleveland, Rotherham, London or a withheld number to truly mimic the HMRC
The same for Swansea std codes to mimic the DVLA etc.