You've always been able to get the password for WiFi networks you have on your iPhone if you have iCloud Keychain by looking at them on your Mac. Entering a password for someone while expecting it to remain unknown to them is bad opsec.That seems like a weird feature to add. I have signed friends into my wifi network for them because I didn't want to share the password (and I use my guest network for IoT stuff). So, now they technically could go in and reveal the password if they wanted to know it. Not a big deal, but I'm not sure why making it possible to reveal passwords already typed in is every really a good idea from a security standpoint.
The right way to do this is to use a unique password that you don't use anywhere else, and if your friend starts abusing your network or gives out the password without your permission, change it and don't give it to them anymore.