As in Asia and in many parts of Europe, it is also common in Germany to take off your shoes on the doorstep before entering the apartment. The hosts will usually ask you to remove your footwear and offer you some slippers.
The simple reason for this practice is that the German housewife does not like seeing you carrying dirt from the street into her well-cleaned house.