There's a setting hidden away in android allowing apps to scan local wifi/bluetooth networks even when wifi is turned "off". Enabled by default of course.
(Supposedly; I don't own an up-to-date Android device.)
2 settings, one for Wi-Fi scanning and one for Bluetooth