5 things could be different:
1. The water used in the soda (& ice in a fountain) could taste different than what is used at the bottler
2. The sugar/HFCS ratio between the fountain syrup & bottle syrup could be different.
3. The carbonation level between the fountain & bottler could be different.
4. If it comes in a plastic bottle, it could pick up a plastic type taste with age.
5. How long did that bottle sit around before you bought it? Was it stored in a hot area for a while along the way? Same for the fountain syrup. I had some nasty tasting sodas due to having been stored in a hot area, even though it was a short time.
Life is too short to drink crummy sodas...