Free money, housing, and healthcare for everyone is also the law here in Germany, which is why we get flooded by illegal immigrants too..
..and that's why these Western European welfare states are collapsing. You can only afford something like this if your population overwhelmingly consists of educated, skilled people with a strong work ethic who would never voluntarily sign up for welfare. Once you allow millions of foreigners into the country who are neither educated nor skilled nor have a work ethic such systems start to collapse.
Really, that is your position?!
And I don't think Sweden and Germany are giving free housing to individuals that overstayed their visas.
They get not only free housing, but also free food and even a janitor! That’s better than significant part of the population does. Do you think, that delivery driver or a nurse can afford more?
No, it's not. The weight of illegals on the welfare system is a rounding error compared to the effects of an aging population. And if you were familiar with people in this situation rather than spitting out far-right talking points you'd know that's it's not an enviable situation and not one they yearn to stay in.