Because it is expected that the Church and its members will obey the law of the country. "If" they become aware that the person or persons they are helping are illegal immigrants, then they have a duty to report them to the relevant authorities. The ONLY exception to this is the "seal of the confessional".
The Church is supposed to spread the Gospel and "love our neighbor as ourself" - and if that conflicts with one of man's laws, which do you think we are supposed to obey?