ANSWER
Because it was essential for the Union to deprive the Confederacy of the last naval base that it was still possessing in the Gulf of Mexico and to effectively shut and "seal" one of the last southerner port, which the blockade runners were still making use of. Furthermore another task was that of destroy the Confederate naval forces standing there, first of all the ironclad "Tennessee".
admiral David Farragut captured New Orleans and Mobile.
Liberating New Orleans and Mobile
New Orleans and Mobile.
On August 5, 1864, Admiral Farragut and his fleet entered the harbor of the port city of Mobile, Alabama. Farragut had four monitor ironclads and seven wooden warships. The city was actually captured on August 23, 1864.
Mobile
Confederate Admiral Franklin Buchanan was charged with the defense of Mobile Alabama. After a struggle, Buchanan surrendered to Union Admiral Farragut on August 23, 1864.
In August of 1864, Union Admiral David Farragut was faced with the task of sealing off the port of Mobile, Alabama. There were two Rebel forts Morgan and Gaines. Also was the Confederate ironclad ram, CSS Tennessee and three gunboats. Farragut also had to navigate around mines, torpedoes and sunken wood piles.
After the fall of New Orleans in the late Spring of 1862, Admiral Farragut sought permission to assault the Alabama port of Mobile. The US Navy, however, delayed any operations towards Mobile and instead ordered Farragut to secure control of the Mississippi River from New Orleans up to Vicksburg, Mississippi.
Union Navy Admiral who relieved the blockade-runners' ports of New Orleans and Mobile.
David Glasgow Farragher was the first admiral in the United States Navy. He is famous for the quote, 'Damn the torpedoes! Full speed ahead.' He served as a Union officer in the American Civil War, and is best known for the Battle of Mobile Bay.
After the Union ironclad Tecumseh was sunk during the Battle of Mobile Bay, Admiral David Farragut faced a critical decision on whether to continue the assault on the Confederate defenses or retreat. Ultimately, he chose to press on, famously signaling, “Damn the torpedoes, full speed ahead!” This decision led to a successful Union victory, despite the risk involved, as Farragut's forces were able to breach the Confederate lines and secure Mobile Bay.
Admiral David Farragut was one of the USA's best admirals. If one were to narrow down his best two achievements in the US Civil War, one was certainly capturing New Orleans and seizing control of the valuable port of Mobile, Alabama.