That is not related. Mac computers store the last successful wifi credentials in in the EFI, and use them to give macOS Recovery internet access.
It has the SSID in plaintext in current-network and preferred-network, not the passphrase. I’m not sure how it’s obfuscated or encrypted but it is not plaintext