Picture, for one moment, the situation that Italy and Greece (the two main countries that these immigrants landed in) if Germany hadn't opened its borders. They would be suffering the full weight of the problems they cause, both the problems caused by mass movement of people and also the various but scarce problems associated with extremism. The burden has been spread across Europe, which means that these two economies are less likely to struggle.
Also, saving lives.