So because the government misused its authority in one case it is doing so in every other case? Are you suggesting attempting to illegally cross the border is not dangerous?
According to the UN the government is misusing its authority right now.
The danger is largely a result of the system itself.
And no, a significant amount of illegal entries is not dangerous. Asylum seeking (which can be done after border crossing legally even with no visa), coming on temporary visas and overstaying (usually picked up on visitations), etc are all quite safe.
The least safe methods are most often utilized by those with the least means. They don't have the money or education to get visas or know their rights at the border.
These are also the people for whom the children would be likely in more danger by staying in their country of origin. And the best way to help them is not breaking up families or sending them back.