Changing database context before creating new database
Often these examples are accompanied by (or are expected to be copied and pasted to a script with) other commands, such as a DROP DATABASE first (which can’t happen if you’re in the context of that database that you’re trying to drop and re-create).

There are a few commands that need to be run in master, but not a whole ton. This may just be a convention by habit rather than by reason, and in all honesty, it probably is the source of many mistaken deployments to master instead of a user database. I wrote a tip about this situation:


Cleaning up the SQL Server master database