I found this article by Apple Support which is interesting -
How iOS decides which wireless network to auto-join
iOS follows these guidelines when deciding which wireless network to auto-join.
iOS defines two categories of networks: hotspot and private.
A hotspot network can be an HS2.0/Passpoint (802.11u) network, a "captive" network, or an EAP-SIM network. iOS distinguishes between captive / EAP-SIM and HS2.0/Passpoint hotspots.
A private network is any network that isn't a hotspot. iOS considers its own ‘Personal Hotspot’ a private WPA network.
When iOS evaluates SSIDs to auto-join, it prefers known networks, higher levels of security, and stronger relative signal strength (RSSI).
iOS will try to connect to networks in this order:
The private network it most recently joined
A private network
A hotspot network
If iOS finds more than one network, it evaluates SSIDs by security level and chooses one based on the following order:
Private network: EAP
Private network: WPA
Private network: WEP
Private network: Unsecure/open
Hotspot network: HS2.0/Passpoint
Hotspot network: EAP
Hotspot network: WPA
Hotspot network: WEP
Hotspot network: Unsecure/open
If iOS finds multiple networks of identical type and security level, it chooses the SSID with the strongest RSSI.
How iOS decides which wireless network to auto-join
iOS follows these guidelines when deciding which wireless network to auto-join.
iOS defines two categories of networks: hotspot and private.
A hotspot network can be an HS2.0/Passpoint (802.11u) network, a "captive" network, or an EAP-SIM network. iOS distinguishes between captive / EAP-SIM and HS2.0/Passpoint hotspots.
A private network is any network that isn't a hotspot. iOS considers its own ‘Personal Hotspot’ a private WPA network.
When iOS evaluates SSIDs to auto-join, it prefers known networks, higher levels of security, and stronger relative signal strength (RSSI).
iOS will try to connect to networks in this order:
The private network it most recently joined
A private network
A hotspot network
If iOS finds more than one network, it evaluates SSIDs by security level and chooses one based on the following order:
Private network: EAP
Private network: WPA
Private network: WEP
Private network: Unsecure/open
Hotspot network: HS2.0/Passpoint
Hotspot network: EAP
Hotspot network: WPA
Hotspot network: WEP
Hotspot network: Unsecure/open
If iOS finds multiple networks of identical type and security level, it chooses the SSID with the strongest RSSI.