Actually, the default setting is for the WiFi to turn off shortly after the screen turns off.
Settings.System | Android Developers
WIFI_SLEEP_POLICY_DEFAULT
Value for WIFI_SLEEP_POLICY to use the default Wi-Fi sleep policy, which is to sleep shortly after the turning off according to the STAY_ON_WHILE_PLUGGED_IN setting.
The fact that there is even an option to turn off WiFi when not in use indicates that WiFi is the bigger battery drain. There is also an option to keep the WiFi on when plugged in, which is even another indicator that it drains more.