What are the Wi-Fi disconnect reasons on adb dumpsys wifi? adb dumpsys wifi gives me, among many others, lines like this:

Event [IFNAME=wlan0 CTRL-EVENT-DISCONNECTED bssid=X reason=7]


What does reason=7 mean? What other reasons are there?

If this applies to Android aswell (I guess so since Android does use wpa_supplicant), reason 7 would translate to "Class 3 frame received from nonassociated STA" - Now what does that mean?

(I'm trying to debug WiFi disconnects that shouldn't happen.)
Most likely your problems are caused by one or more attackers performing the Wifi deauthentication attack. Due to a weakness in the Wifi WPA2 protocol it allows to deauthenticate any client ("kick" it out of the Wifi it is connected to). 

There are even tiny portable deauther devices  which can deauthenticate any client in Wifi range. It does not matter if the Wifi is open or protected by a passphrase. Even if the Wifi is visible or hidden (hidden BSSID) is irrelevant for this attack.

May be some attacker using a deauther is driving by (car, bus, ...) and every time your device gets disconnected.

The only counter measure to prevent such attacks is the new WPA3 protocol which is supported since Android 10. To use it support for WPA3 has to be present in the Wifi AP and the Android device.