Why was the Louisiana Purchase available for purchase?

Napoleon had toyed with the idea of reasserting French power in North America and then decided to abandon that project because it was too expensive and he could not spare the troops to protect that vast area. France's possessions in the West Indies were restless and minor attempts to break from the French Empire were occurring in the islands. When the Spainish, at Napoleon's insistance, withdrew the "right of deposit" to Americans in New Orleans, President Jefferson ordered his ministers in France to offer to buy New Orleans from Napoleon. The rebels in Haiti by this time had caused much havoc on the French Army. Some 30,000 French troops had died due to battle or tropical fever. The Americans were surprised, but urged Jefferson to accept, France's offer to buy all of Louisiana for $15 million.