I agree mostly with the answer by Jonathan Herrera, but there is an extra nuance that has to do with the way academics see their own position in relation to human knowledge.
As a student, I was a member of the faculty council for some time. In one of the meetings, I listened to a heated discussion between professors about a Habilitationsverfahren, the examination process by which academics in 19th/20th century Germany gained the right to teach without professorial oversight and to apply for professorships/chairs.
The candidate applied for the right to teach in the field of "History of the 19th century". A number of the professors voiced the very strong opinion that such a narrow field was not worthy of acknowledgement, and that someone who gained a right to hold a chair at a German university must be able to represent all aspects of "Modern History". They insisted that the field of history rightly distinguished only between three fields for habilitations: Antique, Medieval and Modern History. They also looked down with horror to the engineering faculties, where professorships were sometimes granted only based on experience in practical work and accepting candidates without a habilitation. How could an idividual with such a narrow qualification ever represent the highest standards of academia?
The proponents of narrower fields of expertise would not make much out of the distinction between "Professor der X" and "Professor für Y". They would point out that the old concept of a "Universalgelehrter" (polymath) had become obsolete, that the increase in the overall breadth and depth of human knowledge had the consequence that each individual must acknowledge the limits of his individual capacity.
But those that spoke out so loudly for generalism would fill these two variants with a lot of meaning. A "Professor für", in their opinion, is merely an expert in his specialized field of knowledge. A "Professor der" in contrast is a master of his domain, someone capable of carrying authority, only to be challenged by his peers. He can understand and judge every research within his general field, and remains the unquestioned source of wisdom within the wider society.