Edit: just to make it clear, this is purely out of linguistic curiosity
Edit: just to make it clear, this is purely out of linguistic curiosity
When unknown person approach a German with broken/half-broken/non-perfect German skills, that German has immidiate prejudice about your social status and education level. If your friend is from Brasil, I guess skin colour also plays a role here. Happened to me numerous times. You will get much better treatment speaking English, since that level the playing fields and then they consider you as an equal. Also happened to me numerous times.
So yes, the only way to actually speak German in Germany and not be intimidated is to speak it with people that you already knows and you can consider friends.
Taxi drivers were an exception, they did not seem to have strong English skills. As a result, the most enjoyable German conversation I ever had was with an elderly taxi driver as we stumbled through our knowledge of each other's language.
To show off their English skills. Although this can even happen when their English is worse than your German. Especially Germans are really proud to be "international" even though it's not always justified.
Or they don't want you to stagger about in a language you don't know very well. So some want to be polite and spare you the trouble to speak it. Of course that doesn't help you but you should then insist and say something about "learning this beautiful language" and then usually they can't deny you this.
In IT it's quite custom that anybody speaks English when somebody is around that doesn't speak German as you are expected to know the language well enough. After all in IT, you need English every day. For Zurich, which has a great number of foreigners, this applies as well.
For Switzerland in general, remember that the Swiss dialect is quite different from Standard German and there are many Swiss who are not that comfortable speaking Standard German so switching to English is an option when they actually don't want you to notice how bad their German is.
Same thing happened to me all the time in Japan (to be fair, my Japanese is essentially non-existent except for a handful of phrases) and France (significantly more proficient, but still not a proficient speaker). The Japanese in particular seemed put off by butchering their language.