They used up fuel to transport prisoners to the camps in the first place, then again as they moved them away from the advancing Allies. Why not just leave them behind, and use all those soldiers for actual fighting?
I've seen an account that insists that the Nazis sped up the Holocaust as things got more and more dire. As bad as things were towards the end, why did they remain hyper-focused on extermination?
The proposition that the Third Reich doubled down on its genocide as it started to lose the war is a very popular one, but it is not one that exactly fits the chronology of genocide. For one thing, the first steps to envisioning a Jew-free Europe were broached amidst German victory. The German Foreign Ministry came up with the abortive Madagascar Plan, for example, which would have been a genocide via neglect, in the wake of the victory over France. There were other schemes in German-occupied Poland to work its Jewish population to death via corvee labor. The first major Rubicon in which thoughts of mass murder translated into concrete deeds was during the invasion of the USSR where Einsatzgruppen expanded shooting operations to destroy whole Jewish communities. One of Ian Kershaw's notable phrases on this period is "genocide was in the air," by the last quarter of 1941. Older ideas of working the Jews to death still percolated around the Nazi leadership, but the Einsatzgruppen did demonstrate the appeal of cutting the Gordian knot of what to do with Europe's Jews.
/u/commiespaceinvader has a good post of theirs on when was the deadliest phase of the Holocaust. Although "deadly" is somewhat subjective, he concludes:
So basically, when narrowing down, the most deadly phase, it is probably this time frame between June 1942 and October 1943 when the Einsatzgruppen, the Reinhard Camps and for parts of it, Auschwitz Birkenau were in operation.
While it is possible to see with hindsight that Germany was losing the war in 1942, things were not so clear-cut at the time. Germany after all still had control over Western Europe and a sizable chunk of the western USSR even after Stalingrad. While some more level-headed individuals understood that it might be possible that Germany would lose, the reality was Germany was still in control of a good chunk of the continent.
This is why it is something of a trap to think that those who implemented genocide were somehow behaving irrationally in light of an obvious truth that Germany was losing. As absurd and morally offensive as it might sound, the German leadership that planned and carried out the Holocaust saw the removal of Jews as a logical step to win the war. Jews were not only ideological enemies of National Socialism, it was unthinkable that they would have a place in a postwar Europe where Germany had won. The fact that Barbarossa did not end in a triumphal collapse of the USSR likely encouraged more genocidal thinking as murdering Jews within the German sphere of influence would free up the resources used to feed them, allow for their property to be cycled back to the Reich, and remove a potential Jewish fifth-column from Germany and German-controlled territories (remember, many within the Third Reich's leadership believed the stab in the back legend). The Reinhard camps themselves were fairly efficient at their job, they arguably made a profit and did not demand too much manpower and resources, unlike ghettos and the police that guarded them. Auschwitz refined many of the cruder methods of the earlier camps and became a "factory" for mass death according to Treblinka guard Franz Suchomel. The SS's WVHA office also proved quite adept at organizing the labor of camp inmates, Jews and non-Jews, towards productive labor that had incredibly high wastage rates. Many of WVHA's activities ticked off two boxes: they strengthened the German war effort and they eliminated the racial enemies of the state. Even the mass operations clearing out Hungary of its Jewish population in 1944 was justified in the sense that this was a region of strategic importance to Germany and the shrinking Eastern Front meant it was soon to be a battlefield.
While there certainly was wastage and WHVA's various plans did not always result in the most productive use of KZ labor, those who planned and facilitated the Holocaust often did see their work as a necessary component of the war effort. Not only was genocide conceptualized in middle of German victories, but continuing genocide was often framed as a means to stave off defeat.
I have previously found answers for Did Nazi Germany benefit or suffer economically from acquiring France and Poland?, featuring the work of /u/Estherke and /u/kieslowskifan and /u/Georgy_K_Zhukov and the aforementioned commiespaceinvader.