The media has started changing its tune as early as late 2015 in many cases. New Year's Eve events in Cologne did the rest in that regard. Merkel and her government worked to make major adjustments, some of which the Social Democrats in the coalition weren't thrilled about and the same was true the other way around. There was also a lot of infighting within Merkel's own coalition of CDU and CSU. All in all, there have been major efforts made to get this crisis under control, that includes agreements to be able to send people back whose asylum claim has been denied, etc.
What many people don't seem to realise is that the civil services were not prepared to deal with this situation better and quicker, because of years of being understaffed and budgets being cut.
Having to constantly wrestle with other EU member states about how they'd be willing to help, if at all, didn't make things easier either.
What many politicians tried to do by making statements that may have seemed like "playing down" the issues and condemning every criticism was mostly an attempt to avoid further unrest and racially motivated crimes, etc. Many of these statements have been rather unfortunate, in my opinion. Personally, I think that was the biggest actual mistake Merkel and her government coalition as well as the Greens have made. Helping during a humanitarian crisis was not the mistake. The mistake was not properly responding to the concerns, fears, and criticism of the people, and not communicating things in a more factual, more honest way. Yes, for the safety of the refugees and asylum seekers and the safety of the citizens, controls and registration should have been in place much quicker than they were, but again, that was due to the federal police having had their staff reduced and budgets cut for many years before, and the other civil services being overwhelmed, too. Considering all that, Germany actually managed sort of well.
Now as for the original topic of this thread: What a horrible crime indeed, and the perpetrators will hopefully get punished for it accordingly. A string of things like that have been going through the media recently, and many problems have been laid bare. Obviously, as has been said here already, with the amount of people that came in, you'll very likely have a certain amount of horrible people coming in, too. However, that argument alone, along with some of the other unfortunate statements that some political figures have made, are no longer going to fly, which is why Merkel and her government coalition have, like I stated earlier, already started to move towards a tougher stance quite some time ago.