What if the cab is 800 watts, 1600 watts peak 8 ohm? Using a 500 watt amp?
The ability of the cabinet to handle a specific wattage is completely irrelevant and unrelated to how much wattage the amp produces. The Wattage produced by the amp is function solely of the amp, the signal it is amplifying, and the load it is driving, measured in Ohms.
The amp is what "makes" Wattage; it generates a voltage that pushes current into the cab; the speakers in the cab then turn that signal into sound. It helps to know Wattage is a measure of power, which has a very specific meaning in physics and engineering. P = VI -- power = voltage x current. If you measure the voltage in Volts and the current in Amperes, the power will be in Watts.
The cabinet is just a sink for that Wattage. It is a passive electro-mechanical component. If the amp pushes more Wattage into a cabinet than the cab can stand (more than it is rated for) then the cabinet's components will be damaged or destroyed by heat from all the excess power that could not be handled properly. If the amplifier puts out fewer Watts than the cabinet is rated for then you will be safe from a thermal failure. Some here are quick to point out you could still experience a mechanical failure due to over-excursion of the speakers, but a failure like that usually provides a sonic warning in the form of speaker farting.
So the lower the rated load, in Ohms, the more Wattage an amp will produce. Notice how amps have a minimum safe load, usually either 4 Ohms or 2 Ohms. Anything below that load will allow the amp to produce too much Wattage for it to safely handle. The amp itself is not perfectly efficient, so as the Wattage it is putting out goes up, so does the excess power lost inside the amp, which expresses as heat. The amp can only handle disposing of so much heat. The heat sinks and fans and such all help, but below the minimum safe load the amp will eventually suffer a thermal casualty of some sort, or some component will have to carry more current than it is rated for and it will fail.
In a way, a very crude analogy, thinking that the power handling capacity of the cabinet would affect how much power the amp puts out is like thinking the size of the bucket will somehow determine the flow rate of a hose. Only the nozzle, spigot, dimensions of the hose, and the water pressure determine the flow rate of water coming from a hose. The size of the bucket the water is going into has no effect at all. It does affect how quickly the bucket will fill up for a given flow rate, but will not affect the flow rate. Note that this analogy is imperfect! But it should help give an idea as to why the thermal rating of the cabinet has no effect on a given amp's output power.