They're not technically illegal, but the reasoning behind the welcoming is Christian in essence.
"For I was an hungred, and ye gave me meat: I was thirsty, and ye gave me drink: I was a stranger, and ye took me in: Naked, and ye clothed me: I was sick, and ye visited me". The parable of the good Samaritan comes to mind as well..
As I said earlier too, it also gives us the opportunity to convert them from Islam and them the opportunity to leave it which they likely will not have had in their home countries because it's often punished.
Personally, I'm only for taking in the women, children, disabled and elderly, but Biblically we are asked to help everyone who comes to us in need.