You think this is illegal in China? I can't think of anything the government would approve of more than a giant database of creds at their disposal...
Are you talking about the Chinese or the US government here?
Just bear in mind that from what we know the German and British governments were all in with the NSA and do even more surveillance on their own citizens than the U.S. does (both, by the way, also using terrorism as the pretext - IRA and Bahder Meinhoff respectively). The U.S. is by far not the worst actor in this arena.
Doesn't Google already have this information? Android certainly used to 'sync' your WIFI passwords with Google, in a format that they could decrypt.
It does indeed.
Illegal-sounding + extremely popular + not actually illegal = Often great investments.
Until the law changes
Grow big enough fast enough and well liked enough, you become the law.