It is all about the beans. You can buy empty "tea bags" usually at Asian shops that can be filled with either coffee or loose tea.

If you purchase good beans, grind it correctly, fill the bags with a proper dose, and brew within hours of grinding you can get a very good cup of coffee. The problem with the prefilled coffee bags is that the coffee is completely stale so it tastes it.

Ground coffee has at most a few days shelf-life and in reality is degrading at a very fast rate, so the quicker it is brewed post-grind the better it will taste.

Brewing styles for coffee result in very different flavor profiles. Drip is very very efficient at removing flavor componets as fresh hot water is constantly moveing over the bean. Perk/boil/steep methods all have different profiles as the solubility of the various (thousands) compounds in coffee are extacted at different levels and then the lose of aromatics can be great for the hotter more aggressive methods.

Really though if you start with good FRESHLY ground beans the brew will be vastly better than if you start with flat stale coffee.