"they remained inert in Moscow for five weeks"

 Napoleon's invasion of Russia was based upon a fundamental underestimation of the sheer size of the country. He assumed that his strike against the second capital, Moscow, would paralyse the entire empire; instead, Russia absorbed the blow and continued to function. The normal rules of surrender would have involved the Russians handing over Moscow formally and helping Napoleon find billets for his troops, but the Russians simply abandoned the city without comment, forcing the French to fend for themselves in the devastated city. The half-inadvertent Russian policy of avoiding engagement meant that even after the Battle of Borodino, and after the invasion of Moscow, Napoleon had still failed to deliver the knockout blow that would force Russia to her knees. Napoleon had not planned, nor could he afford, a long-drawn-out war in Russia; Spain was proving difficult enough in this respect.

The fire of Moscow destroyed the supplies the Grand Army needed in order to continue fighting, but Napoleon stayed in Moscow despite this seemingly because he couldn't make up his mind about what to do next. Three possibilities were open to him: to press on to St Petersburg and attack Tsar Alexander; to stay in Moscow until the spring, then try again; to retreat back the way he had come. He didn't have the necessary resources to pursue either of the former options, so retreat became the only answer. Napoleon's unwillingness to accept this led to the dangerous delay in Moscow that pushed the retreat into winter.

Read a contemporary account of the retreat from Moscow here.