Say, one day you decide to connect your Macbook to some open WiFi router. Let's call it DUPA. DUPA does not require a password, gives you IP (by DHCP) but doesn't offer Internet connection. So, it's useless for you.
Then, you switch back to your home WiFi which is secured with WPA2 and has Internet.
Next day, after busy work hours you are back at home and want to connect to your own WiFi. You open your Macbook and... it's automatically connected to DUPA instead of your WiFi! And it happens on next day and on next day, and so on.
It happened to me. I was sure I could delete the DUPA network from the Preferred Networks list in System Preferences » Network » AirPort, under the Advanced... button, but DUPA wasn't there.
The only way I found and which work is to open Terminal and put this:
sudo vim /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
<key>SSID_STR</key> <string>DUPA</string> <key>SecurityType</key> <string>Open</string>
<key>SSID_STR</key> <string>DUPA</string> <key>SecurityType</key> <string>WPA Personal</string>
Mac OS X Hints
http://hints.macworld.com/article.php?story=20101014125740797