While I'm not challengingIn addition to Mike Scott's answer, I'm curious if thatthere is the actualanother reason behindwhy your WiFi network could have been working when you got home.
My question is how did you set upWhen the newernew phone? If it was justset up at the store, didif the tech dodid a backup/restore between phones or otherwise transfertransferred any of your old phone's data over to the new one? If that is the case, then settings would have been transferred as well. In this case, WiFi SSID credentials arewould typically be part of the transfer process and that would explain why your network was joined when you got home.