In Germany, garbage is considered a serious issue. There are various levels and ways of mandatory recycling that need to be implemented by everyone, including private households. For example, depending on the city, paper, "Gelber Sack", organic material, and everything else besides special disposables like for example batteries must be seperated, and compliance may be checked, and fines may be handed out in case of violation. Some people moving to Germany are surprised about how serious it is.
This explains why the garbage was checked, and why it was possible to track down the source.