President Donald Trump defended on Monday the treatment of detained migrants and illegal immigrants caught crossing over the border.

“We’re not in the hospital business. We’re in the border security business at the border,” Trump said. “And all of a sudden, we’re forced to be in the hospital business.”

The president spoke to reporters about the flood of migrants crossing into the United States after signing a bill of emergency funding to improve the conditions of border detainment facilities.

Trump said that most migrants and illegal immigrants were coming to the United States for economic reasons.

“They’re coming up because they want a piece of what’s happening in this country. They want the economy. They want the jobs,” he said. “They’re not coming up, for the most part, for other reasons.”

Trump thanked Health and Human Services (HHS) Secretary Alex Azar for working on the difficult task of caring for migrant minors.

“The decks are really stacked against him,” he said. “The cards are not good, and yet the job your people are doing is incredible.”

Legally, unaccompanied alien children can only be held for 72 hours by border patrol agents before they are sent to be cared for by Health and Human Services. In May alone, HHS was caring for 13,123 minors.

HHS plans to expand the capacity of child shelters after the new bill sent $3 billion of emergency funding to the agency.

Trump said that the children were used as “pawns” by smugglers and criminals to get individuals into the country more easily.

“When you’re with a child, even if the child is not yours — which in itself is ridiculous — then it’s much easier to come across and come into our country because the laws are very bad,” Trump said. “Our immigration laws are very bad.”

Border Patrol agents apprehended 332,981 migrants families and 56,278 unaccompanied minors — 389,259 families and children in the first months of 2019.