I couldn't agree more with you on this. Sometimes it's best just to avoid pickled anything though.
You could very well be allergic or sensitive to the onions and having them pickled. I would stop eating them until you have a food allergy test done.
the head is really in tuned with the stomach. its the eye of the stomach if you want to look at it like this. the acid content must effect your stomach, and therefore your head tells you. just like your face would change color if you eat spicy food. its normal! it would be fun to know at what level of acid your stomach acid is at! mine is higher than normal. :)
Your body doesn't like pickled onions in particular. Not sure why if you can eat them raw or cooked, but your body is telling you not to eat them pickled. Go to Mercola.com for information about fermented foods. There is a right kind and a wrong kind for proper health and nutrition. I personally can't tolerate any kind, because of tyramine intolerance. Anything heavy in sulfites/sulfates or nitrates/nitrites should be avoided. Those are the things that contribute to the cancers spoken of earlier. The right kinds of fermented foods are supposed to contribute to your health, but you still need to listen to your body if it is rejecting stuff. That's what I have to do myself. I can't eat things like pepperoni or sausage or other such preserved meats for several reasons that are all related to tyramine intolerance. I mention those, because they could be confused with fermented foods. But, Mercola talks about the right kind of fermentation. It is very, very important to get the right kind in order to get enough vitamin K2. While he talks mainly about a Japanese food called nattokinese, there are other appropriately fermented foods, like cheese (not all) that are healthy for you in regards to fermented foods. Definitely not all cheeses. Another tyramine food, though, so it's out for me. Vegans and vegetarians who don't like natto should consider supplementing.
I'm not sure, but go easy on pickled foods as high quantities are related to esophageal and stomach cancer. In small amounts it's probably fine.