It is not about closing doors. It is not about preventing people contracting. It is not about protectionism.
The challenge in hand is how to maximise the benefit for the local community when tenders are awarded.
As an example, if a finance tender is awarded to a local firm of accountants, then the money is spent locally, circulates locally and can result in higher and better skills being available locally.
It is clear that a Council - for instance - has the power to insist on certain local benefits as part of the tendering process. That might be the creation of a certain number of apprenticeships or other specific terms and conditions which ensure that the local community benefits.
As long as everyone has the same obligations, that is perfectly permissible, and this can dissuade those companies with little interest in the community, beyond the tender, from bidding for the work.
It doesn't guarantee that local firms will win the work, but it does keep more money in the local community.
Which is A Good Thing.
As I argued 5 years ago, it is possible and legal to do this if the will-power existed in the Council Chamber.
It didn't then, and I suspect it doesn't now.