According to § 96 AufenthG it is illegal to aid people, who have no permit of residence and whose application for asylum has been denied. However, this is not as clear as it sounds, since emergency relief and humanitarian support is encouraged in general.
However, as I read § 96 (I am no lawyer), it is slightly biased toward trafficking and the commercial aspect of the facilitation of illegal entry.
I know that in some countries this would be illegal, not sure about Germany though TBH.
Edit: No sure why this got downvoted, especially considering the response by mtrn.