the issue is in implementation.
Power is Voltage * Current.
in class A/B, if you want to have 50% output voltage, then the speaker see's 50% of the DC "rail" voltage, and the output transistor see's the other 50%. the current that flows through the speaker also flows through the output transistor. so the amp is dissipating an equal amount of power as the speaker. Since audio is rapidly changing, the output is rarely near the highly efficient peaks (eg, 100% on the speaker, 0% on the output device), and thus the efficiency is low.
the class D amp acheives 50% output voltage but switching the output device to an on state for 50% of the time. the switch has two states -- fully on (high current, no voltage) and fully off (high voltage, no current). in both states there is minimal power loss.
For this reason, class D tends to have high efficiency over a wide range of power output levels, while class AB does not.