Let's say you have a cask of dried figs on Shabbat. You can open it and take out figs, but you should not plan to use this cask for storage afterward. You might think that making an opening somehow violates Shabbat, but in truth, it does not because you need the food, and for that, even destructive acts are permitted.
Similarly, you can open a Coke can on Shabbat. And yet, very careful people may squash the can afterward.
Why did our rule mention dry figs? It wanted to address a complication we would otherwise not have guessed. Dried figs were usually pressed into a cake, and one would need a knife or a sword to cut them. Since he is allowed to use the knife to cut the figs, he would also be allowed to use it to open the barrel. However, this was a stringent position of only one Sage, Rabbi Nechemia, and therefore would not represent the final law. The Talmud derives this from the ruling and goes on to draw many other subtle observations.