Resident prioritization is in fashion

For some time now, prioritizing residents has been in vogue. A few days ago, the Prime Minister announced assistance for first-time home purchasers in the Balearic Islands for a minimum of five years. But this isn't the government's first measure in this regard. This same five-year residency requirement can already be found in Limited Price Housing (HPL), Ibavi Social Housing, in guarantees for the Nova Hipoteca Jove program, and in access to the Secure Rental program. Similar conditions can also be found in municipal developments on the islands.
What's interesting is that a segment of the left is beginning to embrace these types of measures, initially promoted by the PP government with the support of Vox. They are calling for the protection of residents from mass evictions, such as those caused by gentrification. However, this condition of residency applied to social or housing policies excludes a very significant portion of the population who have recently moved to the Balearic Islands, many of whom live in much worse material conditions than the majority of residents.
Thus, a question hovers over this issue: is this prioritization of residents morally acceptable? Should a person have greater right of access to a good simply because they have lived in a place longer? Or perhaps all of this is a form of covert nativism? Nativism, in principle, considers that natives have priority over newcomers.
Paradoxically, a significant portion of the left also raises this banner, that of "locals first." Unless one genuinely starts from a nativist conception, justifying the prioritization of long-term residents poses a challenge. In any case, the residential crisis, like so many others, leads us all to stretch our moral principles and consider ad hoc exceptions. To answer this question, here's a list of arguments I've heard activists and politicians use without using nativism as a justification:
First, there's the potential right to remain: people who have lived in a place for a longer time would have a connection, an established social network, which means it would be more difficult for them to move elsewhere. The weakest point of this argument would be that it's not immediately clear to what extent prioritizing one person's roots outweighs the potential poor economic situation of another who hasn't been in a place for a long time.
Second, there are those who consider protecting residents to be key to ensuring the continuity of basic services: in a context of expulsion to the periphery or outside of the population of workers needed to maintain basic services, prioritizing them in housing distribution is essential. In any case, with this argument, the 5-year residency requirement wouldn't always resolve what to do with workers who come from outside and also support services considered essential.
Third, tax merit: those who have contributed to the public coffers for longer should have greater access to community assets, especially if they come from the public sector. This runs the risk of prioritizing the elderly over the young. Unless this merit were transferable from parents to children, but then this would incur a nativist argument.
And finally, another argument I've heard a lot is that of preserving community identity: protecting local culture and identity from assimilation or homogenization would be a value worth protecting in itself. Thus, prioritizing residents in the housing market would be a way of protecting their cultural traits. The main problem with this reasoning is that discriminating in access to a service or on cultural grounds clashes with very basic elements of our political culture. Therefore, using the criterion of minimum residence as a substitute for that of "bearer of a certain culture" may be more socially acceptable, but it is problematic upon closer inspection.
All the arguments I have presented here can be criticized from different ideological perspectives, as is always the case when one declares that this or that thing is 'important' or 'valuable'. But, at the very least, they have the virtue of not appealing to people's origins to deny them or prioritize them over what we can consider a right, such as housing. And this is important, since using nativism to justify a public policy that may eventually make sense can lead us, in the future, to view true immoralities favorably. That is why it is essential to choose our ideas carefully, evaluating their assumptions and implications.
The fact is that faced with the housing shortage, we have many options as a society, but to narrow it down to just two: do nothing and let the criterion for distributing the shortage be that of the market, that is, the highest bidder, or introduce other formulas that find a balance between everything considered. We therefore need to continue thinking about how to make the moral intuitions we islanders have, such as "it is not right that we are forced to abandon our home," can be expressed and translated into public policy without incurring intolerable discrimination.