They have now also realized that this is no longer lawful.
That would be news to me. Actually, the local jurisprudence here in Germany is clear on that.
To my knowledge, local reference and workplace in the location are not social criteria. It is not the salary that is taken into account, but a reference that, in my opinion, goes against EU freedom of movement.
In 2009, the Commission launched a second attack and criticized not only the local resident model of the municipality of Selfkant but also the resident models of 4 South Bavarian municipalities. These infringement procedures have not yet been completed because the Federal Government and the Free State of Bavaria have defended themselves.
And why have they not been completed? Whose bread I eat...
Instead, the Federal Ministry of Construction said in March 2017:
The "local resident model" will again be legally secure in the future. This enables municipalities to allocate building land to the local population at a reduced price. Bavaria’s Minister of the Interior and Construction, Joachim Herrmann, and the Parliamentary State Secretary in the Federal Ministry of Construction, Florian Pronold, have jointly advocated the local resident model in the EU for years. Herrmann and Pronold see the recent agreement on a model compliant with European law as a huge success: "Local resident models especially enable young local families to afford a roof over their heads at home. Otherwise, young families would have no chance against financially strong outsiders on the normal real estate market."
This has been reflected in § 11 of the Building Code.
as well as the acquisition of suitable living space by lower-income and less affluent persons of the local population;
To my knowledge, local reference and workplace in the location are not social criteria. It is not the salary that is taken into account, but a reference that, in my opinion, goes against EU freedom of movement.
Well, see the Building Code amendment above from 2017...
Why should I be preferred in my hometown? If it is fair, then a lottery or first in, first out.
Quite simply. It is supposed to enable the children of the current population of the city/municipality not to be displaced from their homeland.