Why did the Germans build extermination camps?
Well, they were built to exterminate (using starvation, forced labor, diseases, gas chambers and, in general, all forms of brutal violence) some categories of people considered inferior (untermensh), particularly, Jews.
This is quite a complex question but also very interesting. At the start they were only concentration camps (where to put people you do not want going around free) only after they became, even in the mind of the Nazi leaders, extermination camps for the Jew population.
I see the formal starting point of the change into extermination camps from the The Wannsee Conference a meeting of senior officials of Nazi Germany, held in the Berlin suburb of Wannsee on January 1942 and organized by SS-Obergruppenführer Reinhard Heydrich to ensure the cooperation of administrative leaders of various government departments in the implementation of the final solution to the Jewish question (extermination).
I am not saying that before the camps were holiday resorts but after the conference they officially became places where Jews were specifically sent to be killed.
I would like to suggest a very good movie on this subject: Cospiracy (2001)
It is not about grim images or violence but it helps to understand the attitude that led to the extermination.