I used to work for UPS, customer service. Being the kinda guy I am, I spent a lot of time exploring the system instead of doing my job. I once got Paramus on my case because of my incredible skill of pressing ESC twice at the AS/400 menus and being put into a console, from where I could randomly reset other operator's terminals during a call, and send "tweets" to the whole floor. Fun times.
Anyways, the way it worked back then is that international packages arrive
en masse at the bonded warehouse. This warehouse is on Canadian soil, but legally something like international waters, so all packages are physically in Canada, but not yet legally.
Yes, there were armed officers. They aren't joking. I checked.
So anyways, back then the customs paperwork was attached on the box. Someone collected all the invoices on the box, entered the information in the computer. Then the customs brokers calculate the customs fees according to a gigantic set of tariff codes, which specify the taxes, duties, excise, you name it.
The broker then sends the papers with this information to Canada Customs, who then stamps the forms, which are then sent back to UPS to "release" the shipment on its merry way.
In the meantime, if you don't have an account with UPS with money in it, UPS paid the fees to Canada Customs, and will recover that cost with a vengeance at delivery.
There was a class-action suit against UPS about that. It never went anywhere. They're still doing the same today.
Even back then, you could transmit the customs information ahead of time, but only if you had an account and used the 1st or 2nd day air services.
Couriers all work more or less the same, no one really opens the boxes to check, it's all off the invoice and the general mood in the office that day.
No one really cared about the parcels for "little people". UPS was more about customers that needed a fleet of 18 wheelers at their warehouse every day.
I use the postal service as much as possible, there should be a service in exchange for that 50% that's missing on every paycheck!