They're actually formulated differently, at least at the Coca-Cola size of producer. It's worse for smaller, regional producers who use a single formula.
Soft drinks can eat away at container materials, and so part of the container becomes of the beverage. Glass is the closest to impervious, aside from the cap, so it's usually the same as the fountain formula, while Aluminum requires a plastic coating in the can, and the plastics used in plastic bottles are by far the worst. Large producers actually adjust the formula to minimize the taste difference, but it's only partially effective.
This same phenomenon also occurs in most beverages, including beer, juice, and milk, but the container varieties are far fewer across other beverages so most people don't notice. Milk out of a glass bottle is definitely better than milk out of a plastic bottle, for instance.
Soft drinks are not nearly as problematic in their concentrated syrup form, as it turns out water is a huge contributor to the problem, so they're usually just shipped in mylar bags.
As an interesting aside: Coca-cola products out of newer McDonald's automatic fountains dynamically adjust the syrup/water mix based on the amount of ice the customer asked for, so that when it melts during normal drinking it will be as close as possible to the ideal mixture.