How you know 100% its true?
This was Nintendo's policy in the 80s and early 90s, to short supply retailers who had already made inventory purchases, and use their market position to get (in effect) short-term no-iterest loans from retailers. They did it with the NES and SNES, which worked brilliantly for the NES, basically getting money up front for a promise of console deliveries, and then intentionally under-delivering, and using the upfront money as a no-interest loan. While it initially worked for the SNES, it allowed Sega to become a market force with the Genesis. Sega aggressively distributed the Genesis to retailers, despite Nintendo trying to prevent them to (threatening retailers that if they sold Sega products that they weren't allowed to sell Nintendo products), but this ultimately backfired for Nintendo and earned ill will from major American retailers like Toys R Us and WalMart. Sega wouldn't have existed in the capacity that they did without Nintendo illegally using their market cloud in the 80s and 90s.
So, this was their expressed policy in the 80s and 90s, it stands to reason that they still did it with the NES Classic.
It's not that they have millions of NES Classics in a warehouse. It's that they intentionally do not produce enough hardware to meet demand. The short-term loan system isn't there anymore, as power has shifted from producers to retailers over the last 20 years for a company like Nintendo. Nintendo also still operates under the broken idea of short selling for hype, as well, to make something seem hot. It backfires almost every time. But, it's not like Nintendo is some market genius or an impenetrable force of industry expertise. They continually show an unwillingness to adapt to new business and consumer trends in the market, and then make up for continual losses with one or two big wins that the market begs for (e.g., Pokemon Go, Super Mario Run, Mario on DS, NES Classic).