It was the official capital of Russia at the time, and much closer to friendly Poland. Was there a reason?
Napoleon's central objective in the 1812 campaign was to destroy the Russian army at the Polish-Lithuanian frontier. This hope was evident in his proclamations to his troops that termed the invasion "The Second Polish War" which hints that Napoleon did not want to be drawn into the Russian interior but instead keep the war within Poland. However skillful Russian intelligence, coupled with a very divided Russian leadership which prevaricated until retreat was the only viable option, meant that the Russian army evaded the knockout blows Napoleon aimed at it. In theory, Napoleon could have marched north towards St. Petersburg and the densely populated Baltics after the start of the invasion, but that would have left an undefeated Russian army at his flanks. So Napoleon opted to chase the Russian field armies which culminated in the Battle of Borodino. This bloody battle left the French in no condition to continue the campaign but Moscow was within reach of the remnants of the Grande Armee. There is also some considerable evidence that Kutuzov wanted the French to occupy Moscow because it would halt the French advance and give the Russian army time to regroup after Borodino. Moving on St. Petersburg at this point was out of the question as the distance was too great for the shape the French army was in, so the occupation of Moscow became a false political victory for Napoleon as he thought that occupying this spiritual capital of Russia would compel Alexander I to come to terms, which the tsar would not.