Identification and segregation is an important element of any welfare system, to prevent the system being destroyed by an unlimited amount of persons drawing aid while only a relatively fixed small pool provide the aid.
The state in the more liberal countries did not usually introduce such measures to make it difficult to live there without ID until the state had pretty much fully taken over the prior job of the church (or family) to provide to the unemployed, sick elderly, etc.
On a smaller scale, imagine back in certain periods of the old days, when families were the main method of social security. If you could not identify who was your own brother or mother, you would constantly being scammed (or even not scammed, just overwhelmed) until you were broke or the system broke.
I don't have any answer how to roll back the nationalistic identification and Orwellian immigration systems without decoupling social benefits from citizenship/residency, or from becoming so incredibly wealthy you just don't care.