My knowledge, is certainly small about the topic, but as far as I understand, those camps weren't even made for the sake of laboring them. I think enslaving populations is pretty evil, but I would understand why would someone do that. But simply slaughtering so much people, just for nothing? Even if I were a psychopath that would just sound plain stupid. Spending resources on killing people who are a far less threat than let's say the Soviet Union or the Allies..
The motive behind the Holocaust is really exactly what it says on the tin. Nazi ideology was completely inseparable from both anti-Semitism and anti-Slavic racism, and so the Nazis' pursuit of their war aims included the war aims of ethnic cleansing in Europe and Russia.
Although the mass killing of Eastern European Jews started during the Nazi occupation of Poland, I would argue that the Shoah (preferred term for the killing of Jews specifically during the Holocaust) in its final, industrial form really began with the invasion of the Soviet Union. The Nazi plan for Eastern Europe and Russia - Generalplan Ost, or GPO - called for the removal of non-German peoples west of the Ural Mountains and the destruction of the Soviet state. In Nazi thought, Bolshevism and Jewishness were intimately linked, and so the destruction of Soviet communism was linked with the destruction of the Jewish people. The Nazi conception of their war with the Soviets as a war of two opposing cultures and races rather than two political bodies - a war of annihilation, in their own words - was the last cognitive step in the escalation of Nazi ideology towards Jews. The fact that the Nazi war aims in Russia were explicitly genocidal conditioned the escalation of their anti-Semitism into the Shoah.
The plans for Operation Barbarossa, the German invasion of the USSR, included provisions for units dedicated entirely to mass shootings of Jewish civilians (and Communist party officials, members of the Roma communities and other ethnic minorities, and so on, but primarily Jewish people) called the Einsatzgruppen. The Order Police were also heavily involved, as were of course the SS and the regular German military forces of the Wehrmacht. The Einsatzgruppen, the Order Police, and the Nazi military killed probably about one million Jews in 1941 and 1942. Many of the the men who participated in these shootings exhibited psychological symptoms and breakdowns in morale and discipline, which contributed to the development of more industrial methods of killing, such as mobile gassing vans. In January 1942, the Wannsee conference cemented the "Final Solution" as industrialized killing in the camps, coupled with death by labor for able-bodied Jewish persons. I should note that some of the camps were already under construction by January 1942, and built on the experience of the SS in the Aktion T4 program for the mass killing of mentally and physically handicapped people before the war.
Once the camps plan was solidified, the Holocaust began in earnest, resulting in the deaths of six million Jews and five million Roma, Poles, and others. To sum up your question - the motive for the Holocaust was Nazism's hatred of Jews, and the fact that the Nazis saw the extermination of Jews as an important part of their goals for the war.
######Sources & Recommended Reading:
I would also recommend any of Omer Bartov's works on the Holocaust and German society.