They usually have several boxes of glazed doughnuts already packaged and ready to go. Of course, some people need fewer than a full dozen-- some order a single glazed doughnut or a few glazed mixed in a variety box. It is their normal practice to have one box of glazed near the window that they pull from to fill those smaller orders. Someone just grabbed the wrong box when they were filling the bag for OP's order.
We are from Winston-Salem, NC where Krispy Kreme originated. The employees get free unlimited doughnuts while working so there is truly no way they would steal out of a dozen that was for a customer. Check out their website, it says free doughnuts as a perk of employment like 5 times just on this one page.
WORK FOR KRISPY KREME! Like I mentioned earlier in the thread, they are definitely eating the hot fresh ones (which is really the only way they are good) not the ones that have been sitting around in a box.