It seems like there was good reason for these concerns that the person was going to work. However, the person was right there at the border. Why did we not just turn them back around. I don't think they had overstayed their time in Mexico? Further they had a return flight weeks ago. AFAIk we have been paying to keep this person detained for over a month now. Why not at least put them on their original flight back. This entire approach with detention and deportations seems a very expensive solution.
Edit: In general it seems that if the goal is to reduce illegal immigration, it would be much cheaper to deter most illegal migrants who generally come for economic reasons by fining employers of workers without permits. Instead of cost it brings in money and the illegal workers will deport themselves if all work dries up.