The simplest: he's salaried. However, I don't think mailmen generally are.
Alternatively, the mailman is paid hourly but is expected to put in 40 (or some other constant) hours of work per week. His primary role is to deliver mail, but any extra time he has after doing his route he fills by sorting packages, filling out paperwork, etc. If he had a longer route that morning, he'll try to work through the sorting faster. If it was a shorter route, he might pace himself more casually.
You might say - in response to either of these - "but this doesn't scale! If there were fewer packages, the company wouldn't have hired as many mailmen and would have saved money!" Again, I don't know much about this industry, but in some (e.g. rural) areas, staffing might be done based more upon geographical coverage than the expected number of packages to be delivered per day. Furthermore, the company may be choosing to deliver such a package in order to secure its branding. Does offering to deliver this unprofitable (on its own) package lead to a promise of further, profitable delivery contracts? In the case of Alibaba & its courier, it probably did have some weight. Maybe the extra cost of having the deliveryman out on his route longer is offset by the advertising painted onto the delivery van.
It's difficult to measure the value of one very small piece of a big system because its the system as a whole which generates revenue, rather than each individual component.