No it isn't. Someone who ILLEGALLY crossed the border has no validity in claiming they seek asylum after committing a criminal act. If you wanted asylum, you should have sought it at the first safe place you came to where you could contact the nation you are requesting it from, like a US embassy in a third nation.
That someone "walked to America and has no money or ID..." is their problem and theirs alone. That is just an appeal to pity fallacy.
If they are in the US illegally, they can be arrested, charged, and when found guilty, deported. If that isn't possible to their home country, it can be done to a third-party nation willing to take them.
What "war torn countr

" has the US deported someone to? If your home nation is on another continent or across an ocean, well that's on you again when we deport you there.
For a first offense of illegal entry the penalty can be civil or criminal. Civil is deportation with a 10 year no return attached. Criminal it is a misdemeanor with a small fine and deportation with the same 10 year no return requirement. A second or more offense is a felony. That seems more than fair to me.
When a first offense is aggravated by breaking other laws like, illegal employment, illegal use of government resources, or committing other crimes, those weigh on the finding for deportation. Normally, someone is sent to their country of origin. But if there are valid reasons that they shouldn't be sent there, they can go to a third nation that will take them.
Nothing in that is gratuitous, immoral, or illegal. You are the one defending immoral and illegal actions.
The punishment for a first offense of illegal entry as I pointed out is pretty mild. You get deported--preferably to your nation of origin--and can't return to the US for 10 years. What do you think is a fitting punishment for breaking the immigration laws of the US and entering the country illegally?