Why did the french agree to the Louisiana purchase?

because the french needed money to buy weapons to defeat England