France didn't really <em>lose </em>Louisiana, the territory was sold to the United States for just sixty eight million francs, given the prize for the size and later value of the territory, this transaction could be considered by some as a loss for France.
Napoleon's administration sold it, mostly out of the prospect of a new war with Great Britain and to fund his army.