A lot of it, as it is in any job in life, is being in the right place at the right time.
Napoleon had been fighting this army of slaves and free people in Haiti and it depleted his forces. And after the Revolution, when the French were driven out, they stopped and sold this big chunk of North America to the Americans for very little money.

