The world is organized politically as an interstate system, as a global system of nation-states with integral boundaries. In regionalized arrangements, for example in the case of the European Union, member states may relax borders to allow free movement of citizens and residents across them. Nonetheless, all the states in this system, more than 190 of them across the planet, have immigration rules. There is a popular expectation that safety and welfare of citizens and residents should be a top priority of responsive states.
It is well known that the corporate practice of offshoring production to take advantage of cheap labor exposes citizens of developed countries to competition, disorganizes their communities, weakens labor unions, and lowers wages and living standards. This is the effect of globalization.
What is less well known, at least popularly, is that immigration is a globalization strategy; instead of seeing their jobs leave their communities, native-born workers face competition from cheaper foreign labor in their communities. As a result, there are fewer good paying jobs and wages and living standards suffer. Public services are overextended by a larger proportion of the population utilizing them. Housing shortages and neighborhood overcrowding compromise the quality of life. With inequality there is more crime and violence and general disorder. Community disorganization results.
As part of the system regulating the pace and volume of immigration, North American and European states, which have historically been the most generous in allowing migrants into their countries, the United States in particular (admitting more than one million immigrants annually to live, work, and go to school), have detention facilities in which migrants irregularly crossing borders are processed in order to determine their status. Even the most progressive social democratic states, such as Sweden, a country I am currently studying, have detention facilities similar to the ones found in the United States.
It is necessary to vet immigrants to a country, and those that irregularly cross borders are of special concern as they have not been pre-approved to enter. Many migrants do not have legitimate claims of asylum. In the United States, for example, the ratio of illegitimate to legitimate claims is 10:1. Only half of those who are released from detention before being fully processed return for their hearings. This means that a large number of those irregularly entering our country with no legitimate reason to be here are disappearing into the vast population of the third largest country in the world. A significant percentage of migrants criminals and gang members, especially those coming from the Northern Triangle, the world region with the highest rates of criminal violence.
The alternative to migrant detention facilities is to open borders and allow migrants to freely enter countries and go wherever they wish. If one country compared to another country has superior infrastructure, public education, social welfare services, etc., then people from the country with inferior conditions will migrate to take advantage of the conditions other people built for their communities.
The United States, the third largest country in the world, currently has more than 320 million people living within its boundaries. It is projected to add 100 million more by 2050. Just the environmental impact of such a large number of people alone will create widespread social problems.
A slow, orderly pace of immigration avoids the problems associated with large-scale immigration. Therefore, while detention facilities are undesirable, just as any types of confinement is undesirable, the alternative creates more and greater problems.

The solution is not to abolish immigration rules or the institution of border control and migrant care, but to reform the system. Many of the problems associated with detention are a result of the pace and volume of the flows. When migrant flows are heavy, detention facilities experience overcrowding and migrants may endure periods of prolonged confinement. The pace and volume of the flows is what border control systems grapple with everyday. We can reduce overcrowding by more comprehensively securing borders and expanding the network of facilities taking care and processing migrants.
The quality of the facilities and the process thus depends on the support of governments and the quality of leadership and personnel. The system also benefits from restraint on the part of politicians and opinion makers to not mislead the public about what policies entail.
For example, children who are allegedly separated from their parents are often not the children of the persons claim to be their parents. Moreover, when criminality is involved, it is inappropriate for children to accompany adults into more restrictive environments. Sensational reports of family separation leave out critical information about what the process of protecting children involves. Preying on emotionalism, such as portraying as maltreatment crying children in unfamiliar circumstances, is propaganda not information.
Even in well-funded and well-operated facilities, there will be some discomfort for detainees. Detainees are surrounded by people they do not know, having to exist in a manner with which they are unfamiliar, deprive the freedom of movement human beings desire. Uniformed and speaking in a command voice, CBP personnel can be intimidating.
The manner in which migrant safety is secured is necessarily a form of confinement if we agree to integral national borders. Detention is temporary, but any amount of time spent in confinement and uncertainty will be an unpleasant experience. This is true everywhere.