Why do we learn Gemara? We can't learn any Halacha from Gemara, as brought in Yalkut Yosef Halachot Talmud Torah. So why do we learn Gemara at all-it's more useful to learn Halacha!
The last Maharsha on Sha"s explains that the reason the statement of "כל השונה הלכות בכל יום וכו" is cited at the end of Niddah (and after quoting the chumra of Rebbi Zeira in Megillah 27b) is because the chumra of Rebbi Zeira made much of hilchos Niddah obsolete. A person might think that, therefore, there is no more reason to learn maseches Niddah. Therefore this statement is brought to show that learning the halachos of meseches Niddah itself is what brings a person to Olam Habah. (The Maharsha there explains how he knows this statement of learning halachos refers to halachos of Niddah which were made obsolete by Rebbi Zeira's stringency.) There is an intrinsic value to learning Torah.
R' Moshe Feinstein in Igros Moshe Orech Chaim 1:20 explains that this was the mistake of the generation in which the Mikdash was destroyed - they did not make a blessing on learning Torah (Eicha Rabba) - which means they did not relate to learning Torah as a mitzvah in its own right, but only as a means to knowing what to do. They failed to see the intrinsic value in learning Torah.
On a separate note, when I was in Ner Israel, my Rebbe was often asked why we don't learn things that are practical. He explained that if you are learning Gemara and it doesn't become practical, you aren't learning it correctly. If you think learning Gemara is one discussion, and learning the halacha is a separate discussion, you haven't learned either properly. You cannot fully appreciate the Rambam, or Shulchan Aruch, or wherever your halacha is coming from, if you do not know the ins and outs of the sugya in the Gemara. Learning Gemara is a necessary step in learning the halacha, and just perusing the Mishna Berura does not give you a true understanding of the subject at hand.
In truth you can't necessarily pasken directly from Halacha seforim either. Paskening directly from how you understand the Mishna, Rambam, Shulchan Aruch or Ramo, and really any such terse statements, has long been warned against (the Mishna is warned against in the Gemara itself, and the exact parameters of the problem learning the Rambam, etc. directly is a discussion in Rishonim, with disagreements about it).
The necessity of learning Gemara is to understand the source of the Halacha in order to understand its applicability to new situations. Without going back to and understanding the source, you cannot properly and clearly understand the Halacha in Halachic seforim, by and large, and you certainly cannot apply it to new situations correctly.