I seem to remember stock shortages in late July and early August of 2012. There may have even been rumors of shortages in April and May leading up to the 2012 WWDC.
During the run (or should that be long walk) up to the final release of the late 2012s, there were a number of times when Amazon went low on stock. It didn't seem to mean anything then, was probably just due to the vagaries of whatever Amazon uses for restocking policies.
Amazon and the like constantly are getting new stock of things and pushing it out. In their ideal world the number of units they receive in a day would exactly equal the number of units sold that day so they can minimize warehouse space.
For what it's worth - in the Apple refurb store, there were only about 6 configs to choose from yesterday [it was slowly dwindling over the past weeks].
Today, it's back up to 11 config options in the iMac refurb section.