(Maybe it’s because tea is better than coffee?)
Coffee contains several ingredients that act as opioid receptor antagonists, which can be unpleasant (as in "reverse the pleasant / calming effects of endogenic opioids"). Some people seem to be more affected than others, kinda like with the intensive gastrin release / coffee induced instapoop.