If you've ever joined a Wifi network in the past with a particular SSID, then it'll join every WiFi network with that SSID going forward until you specifically forget that network. This is intentional, for WiFi networks that are widespread and have a bunch of access points spread out over a geographic area (like attwifi).
So, if you ever join a WiFi access that that's say, belkin or a netgear, and that access point is basically running unrestricted and out of the box with no changes to the settings, then your iPhone is going to automatically join every other out-of-the-box, unrestricted belkin or netgear hotspot. It's going to continue doing that until you tell it to forget the network the next time you're connected to one.