In retaliation to Spain not allowing American farmers to export their products to them. Because at that time, New Orleans had a very important port that controlled almost 3/4 of the economic input and output. If they had purchased it, they would have control over it and could retaliate against Spain.