Why does the 802.11 wifi spec allow for 11 channels?
802.11 specifies operation in the 2.4 GHz band. This is one of the industrial, scientific and medical (ISM) radio bands, which are used for quite a lot more than Wi-Fi. The ISM bands were in fact allocated for non-telecommunications use, where devices that must necessarily spew RF interference may do so. In the US Wi-Fi gets to operate here under FCC part 15 on the condition that if a Wi-Fi device receives interference, it just has to deal with it. I'm sure other countries likely have similar regulations.

There's no requirement that the other applications in this band (RF process heating, microwave ovens, medical diathermy machines, etc.) will conform to the 802.11 channels. Thus, the ability to move the channel to some degree smaller than the channel width may be useful to avoid interference from or to non-Wi-Fi devices.

It's also worth noting band allocations are not the same in all countries. In some places that aren't North America, it's possible to get three non-overlapping channels on (1, 6, 11), but also (2, 7, 12) or (3, 8, 13).