Baked desserts from home and fine restaurants leave no bad taste in my mouth. But catered deserts at my workplace or those purchased from a grocery store leave a nasty aftertaste that I can't stand. I've noticed this consistently for years with food supplied by multiple locations. Frequently I resist the temptation to indulge because the yuck factor after is not worth the initial yum. What ingredient could it be that leaves such a terrible taste in my mouth that has me scrambling for a toothbrush and toothpaste?
It's possibly whey or something like that. People don't usually use it at home, but it's in lots of stuff at the store. I've heard it can cause issues for some, but I'm not sure about taste.
It may also be the kind of oil they use. Stores are known for using more kinds of oil than consumers usually do, in my observations. Oil can definitely affect aftertastes, in my experience.
The leavening agents they use may be different.
Maybe preservatives of some kind are causing the aftertaste.
It could be the substance or method they use to prevent the baked deserts from sticking to the pan. I imagine they don't always do the same stuff there that cooks at home do.
It's possibly not an ingredient at all that is causing the aftertaste. It may just be unfamiliar fungi and bacteria coming from all the people hovering around the food making unfamiliar byproducts that you smell after you eat the food. This is just a hypothesis, but I do sometimes notice a similar phenomenon around food on tables at indoor parties in other people's houses and such, when it's left to sit more than a half an hour or so, especially if people are talking over the food. I don't think this is necessarily a bad thing, but it can be unpleasant. If it's at my house, or if other people aren't around, it's not normally an issue, if so.
However, it might rather be a contaminant, like maybe wood alcohol (which is said to be in lots of stuff, due to contamination) although I don't know that wood alcohol contributes an aftertaste.