It's all based on the expectations. Very little rationality involved in how stock prices move.
No idea why UPS stockholders overreacted the way the did.
In the case of FedEx, if you look at a bunch of the most recent comments, a vocal few folks thought that FedEx was going to miss their earnings forecast by a bunch due to various factors.
And that expectation was already "priced" into the stock.
So when FedEx's earnings were inline with the forecast (1.96 vs the 1.93 to 2.08), and 4Q profit rose 7%, stock went up a bit because folks had been selling off expecting lower earnings and a drop in the stock price.
No relation at all to company performance.