Let's say there are 2 Wi-Fi networks run by 2 different people and they both have different passwords:
Wifi network 1
ssid: Example
Password: 9238
wifi network 2
ssid: Example
Password: 3234
If 2 networks have the same SSID, it shows the strongest connection in available networks right? Let's say I connect to Wi-Fi network 1 whilst it is the strongest and I then move closer to Wi-Fi network 2 however still in range of network 1. Does it try to connect to Wi-Fi network 2 even though the password is different?