All Your Wi-Fi Passwords Belong To Google
You can make the topic as complicated as you wish if you want to dig deep into the technology involved; however, the bottom line is, if you maintain a Google account on your mobile phone, the default settings most likely permit Google to gather any and all Wi-Fi passwords you've used and read them if desired.
Android devices have defaulted to coughing up Wi-Fi passwords since version 2.2. And, since the feature is presented as a good thing, most people wouldn't change it. I suspect that many Android users have never even seen the configuration option controlling this. After all, there are dozens and dozens of system settings to configure.
From there, they could also become available to governments, or other outside actors.
Keep in mind, there is an advantage in this for you as a consumer. If you lose your phone, or simply change phones, all of your previous settings can be re-stored simply by connecting to Google. You can also opt out of the "back-up" or "save settings" features that send the data to Google.
In Android 2.3.4, go to Settings, then Privacy. On an HTC device, the option that gives Google your Wi-Fi password is "Back up my settings". On a Samsung device, the option is called "Back up my data". The only description is "Back up current settings and application data". No mention is made of Wi-Fi passwords.
In Android 4.2, go to Settings, then "Backup and reset". The option is called "Back up my data". The description says "Back up application data, Wi-Fi passwords, and other settings to Google servers".
Again, the most important thing for you to be aware of is that both Google and, as discussed below, "outside agents" could potentially access these passwords. You will have to go into settings manually and change them, for optimum security. There's additional information here.
The list of Wi-Fi networks and passwords stored on a device is likely to extend far beyond a user's home, and include hotels, shops, libraries, friends' houses, offices and all manner of other places. Adding this information to the extensive maps of Wi-Fi access points built up over years by Google and others, and suddenly fandroids face a greater risk to their privacy if this data is scrutinised by outside agents.