When we're talking about a major make/model that's benefited from exhaustive use in LE hands, that's seemingly often not a problem ... unless it is.
One of our guys had the RSA disassemble itself, and lock up the gun, when he brought his NIB G27 to the range for the first time (for a qual). Nothing seemed problematic until he tried to fire the first magazine load through it.
Normal inspections (including proper hand cycling) can help catch some obvious issues. However, sometimes something that may require correction can still pop up during initial live-fire.
In another instance I remember, when we were preparing to begin some T&E with a couple of NIB SIG's we'd received, being a P220 and P226, we decided to run a few mags through them before they were put out for T&E (by the people selected to participate in the T&E program). The ammunition was the current duty .40/.45 loads. The guns were hand-cycled and visually checked, confirming nothing appeared out of the ordinary, and each gun was confirmed as being "noticeably" lubed with the TW25B SIG was using at that time. The magazines were loaded with the current JHP ammo. Each gun was fired by a different instructor, while I observed.
Each of the instructors experienced a single feeding stoppage during the first magazine load (think middle to later in the mag loads). What the hell were the chances, right? Oh well.
Once those hiccups were out of the way, the guns ran just fine for the rest of the session (and I fired both, myself), as well as during the subsequent T&E program.
Sometimes it may not hurt to run a few more rounds through some NIB pistols, meaning in addition to whatever function-check rounds may have been fired at the factory before shipping.
Or, you can not do so, and hope the particular gun you're carrying isn't one of the ones that may exhibit a hiccup during the first magazine load in your hands, and especially if you desperately need it
not to have a "hiccup", essentially out of the box.
FWIW, I don't remember the number of factory "test" rounds Glock may currently be doing for newly produced guns, but according to my notes a couple of recerts ago, we were told they shot 2 "proof loads" and 5 "regular" loads in new guns. A "proof" load was defined (in the class) as being 130% of standard pressure.
In my various M&P pistol armor recerts, I've heard that they test-fire each M&P with 15 standard rounds (brand of ammo varies), using 3 different "test" mags (not the mags packaged with the guns). Nothing was said about production inspections using proof loads, outside of those use during R&D, done by engineering.
I can't remember what SIG told us regarding test-fire in their armorer class.