after the CPU is cut from the wafer its tested. If the CPU does work then its placed in the packager and the pins are wired up.
Then the CPU is tested again and depending on the thermometer they set the clock.
The test is designed to keep the CPU power consumption at 125W which is the standard.
I personally overclock mine so its maximum is higher but I also upgraded the thermal interface material to be able to cope with that much load.
Using the binning of speeds my Phenom II 965 is a few bins down but it overclocks fine to the max speed that Deneb is stable to. Deneb is overlcoks to 4.0 GHz with my factory fan.
The best theoretical CPU for my motherboard is the FX-8350 which is on a store wishlist, that store has indulged in features so I await a feature.
There are newer CPUs but those are designed for even more power, my motherboard is not designed for that level of power and it would likely cause thermal damage over time even if the regulator could provide enough current.