How can I better sort and set wifi network preferences on Mac?
TL;DR;

The file that contains all the information about Known Networks is com.apple.airport.preferences.plist and you can find it under /Library/Preferences/SystemConfiguration/

How to change the order / Delete a network from the order:


Open finder.
From Menu Bar select Go -&gt; Go To Folder.
Copy paste this path /Library/Preferences/SystemConfiguration/.
Locate the file com.apple.airport.preferences.plist and make a copy of it with a name like com.apple.airport.preferencesOLD.plist ( for backup just in case).
Move the original file from the previous step to your desktop to enable
editing.
Open the file with Xcode (or any other text editor app)
In PreferredOrder array you can see the full list in descending
sort.
Change the order or delete a network if you don't want it in the
order.
Move the com.apple.airport.preferences.plist back to
/Library/Preferences/SystemConfiguration/ folder


As you can see the value of each item is wifi's ssid.

You can match wifi ssid with yours wifi name from the dictionary KnownNetworks (above of PreferredOrder in com.apple.airport.preferences.plist file).