I read an article a while ago about how German UBoats were numbered out of sequence on purpose, because if the allies captured U-718 for instance, and the registration was sequential, they would know the Germans had built at least 718 UBoats. I could see starfleet doing something similar with their ship registries.
(Not 100% sure it was the Germans but you get the idea)
I'm not seeing "out of sequence" in the Nazi numbering scheme. However, wartime construction very much involved a "skipping numbers" scheme, with a thousand registries allocated to a specific batch even if barely 400 got built, and the next batch (or subtype, or even all-new class) in turn comprising 300 boats starting at the next even thousand, and so forth.
This might be close to what Starfleet is doing, with the first two digits of a five-digit registry mercilessly rolling over at some set timepoint or whatnot even though construction hasn't yet filled the last three digits up to 999.
The Kriegsmarine number-skipping wasn't rigorously done to provide each new boat type with a nice and round "1 number", either: U-1001 did not differ from U-1000 or U-999, even though U-3001 and U-5001 represented all-new designs. Again, Starfleet might be guilty of this, not every prototype with an initial NX registry having three zeroes or a 001 at the tail end of the registry.
Ultimately, the Nazis constantly adjusted their system to account for changes in production - both utopian fantasies of increased production and realistic downscalings. Again, I see Starfleet doing the same as their strategic position changes (especially as the Klingon threat ebbs and flows). Modern "peacetime" navies may not be good comparison points in any of the above three respects. Although they do account for the one overriding concern: whether it's cool. Which is why the USN chose SSN-21 rather than SSN-774 for the Seawolf, purely to highlight the "this is a future wondersub for the 21st century" thing.
Timo Saloniemi