It's both a painkiller (mu-opioid agonist) and an anti-depressant (SSRI, or possibly SNRI style effects). The fact that many people - including many doctors - ignore the latter effects is, in my opinion, criminal negligence. The SSRI effects are NOT trivial, and last days compared to the "hours" of opiate effect you get.
Even worse, the "M1" metabolite of tramadol is itself an active drug in similar ways, and metabolized by the same P450 liver enzyme. So the rate the drug leaves your system is a nasty differential equation as it competes with itself for the the same enzymes. That equation gets even more insane if you have anything else in your system that interacts with it, even slightly.
Note: I'm not saying it's necessarily a bad drug - the SSRI effects by themselves can be useful for certain types of pain (neurological pain in particular), so it may be a better choice than morphine/{hydro}codine in some cases. People just need to be aware it's not a "trivial" drug, that it can interact with many things, and has more effects than the usual painkillers that may be contraindicated for some people.
Probably the same reason chickens are fed anti-biotics... to increase yields.
In the case of chickens... antibiotics keeps them disease free and promotes growth. Cows milk production is negatively affected by stress and unhappiness. Painkillers help keep them happy.