For troubleshooting reasons, T-Mobile gave me a new SIM card.
After swapping the card, my phone did not know the google password, I had to enter it again.
I tried to research the linkage (is it stored in the SIM, does the phone reset the stored password for a new SIM, etc.)
I am pretty sure that it does not happen on removal of the SIM, because I had taking my old SIM out several times, to ferry data from my old handset.