What many of the people that replied to this thread don't seem to realize is that the serial number on the pistol in question is a military serial number. All the guns made for the civilian market have a different sequence along with a letter prefix. The military M9 serial numbers start at 1,000,000. There are indeed a few legal, military issue M9 pistols out there. Typically they show up via a retired General Officer's estate as they have the option of purchasing their sidearm upon retirement. Once it is officially released from government inventory, it can be sold on the civilian market. I would be interested in seeing a Freedom Of Information report on this one before I would spend that much money though.
I have seen a few genuine US issue M9's for sale from time to time. The last one I saw prior to this, sold for just under $4K. Those folks that aren't collectors do not, nor are they ever likely, to really understand the collector market and their opinion has zero effect on the market.
For example, when the Marine issued MARSOC M45A1's first hit the market and sold at $1500. I heard the usual comments about how that was too much money for a used gun. Now if you are able to find one for sale, they trade hands for around 6-8K. Same with the M17's that were traded in to Sig and then resold by them for $699. Today they are selling for around $2000. Makes me glad I got my surplus M17 when they first hit the market.
There is an extremely limited amount of legal, genuine US Property Beretta M9's in civilian hands and while I am not surprised that this one went for that much money, I am disappointed because it means that I am not likely to ever own one.
The closest I have been able to come is a civilian M9 that I bought new and then sourced and installed surplus military parts on. Except for the frame, which definitely has a civilian serial number, it is identical to the gun that sold on gunbroker. Maybe not quite the real deal, but as close as I am ever likely to come having one.