As far as stains go, perspiration is one of the more unsightly ones. You can't help but feel downright unhygienic, and your yellow-stained white shirt may end up in the trash after a few unsuccessful washes -- or at least consigned to the "only under a jacket" category.
Sweat stains are, as you may have noticed, especially difficult to remove. The color is caused by a reaction between urea, a broken-down protein (also present, in much higher concentrations, in urine) and salts, and often by their interaction with antiperspirant ingredients, as well. The combination can be such a formidable one that you may have given up on getting yellow stains out of your clothing. But if all you've done is wash that shirt with the rest of your laundry, you're giving up too soon.
And if you've been washing it in chlorine bleach, you're only making matters worse.
So, what to do when your sweat "ruins" your clothing? You have a whole bunch of options, actually, especially when the yellowing happens on fairly sturdy shirt components like collars.