My local postmaster let me in on how their process works a few years ago when something went missing.
When you drop off the package it's scanned "in" to the post office. The PO then scans it "in" to a container, and that container number is now associated with your package, and vise-versa. So all the intermediate stops you see in the tracking are NOT your package getting scanned again, it's the container that is getting scanned only.
The problem comes in when the container is emptied somewhere - all the associated package tracking numbers should get released from the container number. Now, if your package is small, it might still be in the container when it's refilled with other packages, and goes on a wild ride around the country to wherever that container is headed. That's why the tracking goes silent for a spell, then suddenly your package pops up out of the blue in some random location.
That's why they don't want to hear you complaining for three weeks. They haven't lost it, they just don't know where it is... temporarily. It IS somewhere, and it'll pop back up as soon as some post office or distro center scans it in and says, "What's this doing here?" then tosses it in the outbound container.