WiFi needs a channel number because it operates on the same radio frequencies as other devices that use wireless signals, such as cordless phones and baby monitors.
These devices would interfere with each other's signals if there were no channel numbers. The channel number allows WiFi to operate on a specific frequency so that it doesn't interfere with other devices.