I disagree that the dealer should NEVER open the box prior to the customer arriving to pick it up. I think that's idiotic.
There are log-in requirements, the gun can't sit there indefinitely un-logged & sealed waiting for a customer to come in & do the paperwork.
It may be a week or two after I get in to my dealer's after notification a gun's in, and he needs to log it.
I get many guns in each year this way, they are ALWAYS opened & logged before I get there.
As far as just going by the box without opening to confirm the serial goes, mistakes are made in packaging.
I've gotten a serial inside that did NOT match the box before.
In the OP's case, he can ask to inspect before filling out the paperwork, but he didn't. It's unrealistic to get indignant over the box being opened prior to his arrival.