That counties and countries are two different things is also obvious, but you need to offer reasons to believe that they are morally distinguishable with respect to economic growth and immigration.
I don't think the original statement is entirely true either - I can think of plenty of countries which don't promote the well-being of their citizens - but I would class those as broken countries, rather than trying to say that the notion of a country is broken. Certainly most western countries exist to benefit their citizens.
In the actual world, San Jose is not in fact appealing to the federal government for assistance; it is reaping the benefits that attend a growing metropolitan population and tax base. On average, San Joseans are better off when more people become San Joseans, for all the same reasons that New York is a more desirable place to live (as measured by the demand for housing) than Wichita.
I've never claimed that there are no states who do not take their citizens' interests into account. I claimed that states often take little or no consideration of the interests of non-citizens. In absolute terms, for example, malaria is a much more pressing human affair than corn subsidies. But corn subsidies primarily affect people within the US whereas malaria primarily affects people outside the US, so corn subsidies dominate malaria in contest for the attention of the US government.
In the case of corn subsidies you can argue that the political process has been derailed in favour of special interest groups. If you follow the chain from corn -> HFCS -> diabetes and heart disease, it's not even acting in the citizen's best interests.
Similarly, it's also trade issues that make malaria worse than it has to be. Screens for windows would make it much less likely to spread - but the material is too expensive for most of the people who really need it.