Not a vulnerability
A PSK mode (PreSharedKey), which is the one here there is "a WiFi password", needs both parties to know the "password", since it is used for deriving the communication secrets. Note that this is different from normal websites, where the server authenticates its identity using the PKI (on their https certificate), the client provides their credentials in plain,¹ and the server then only needs to verify them.
Depending on the methods supported/enabled, the AP might store instead a secret derived from the password, not the password itself, such as the PBKDF2 stated in Annex J. However, this won't work with certain modes, such as WEP or, as mentioned by user71659, WPA3-SAE. Plus, if you implemented that (on the restrictive configuration where it's possible), you would need to start requiring the password for seemingly unrelated operations, such as enabling WEP or changing the SSID.
Not to mention 'features' such as showing the password on the router administrative interface or through WPS. Moreover, all of this would be significantly more effort to code for very little benefit, as the password would still need to be stored in many paths.
¹ Technically, they could do mutual authentication, but it's very uncommon.