I have an Azure SQL Managed Instance and have noticed that database creation and deletion not only takes a long time, 3 minutes to create a new database and up to 5 minutes to then delete that database, but that those times can also fluctuate a lot too. What is the reason for this?
When a new databases are created their files are initialized on Azure Premium storage (which is remote storage) including initial backup so they can be ready for HA, and also they need to be registered in Azure Management Service that controls availability of database. This is not instant, but in most of the cases it should be under a minute. I'm frequently creating databases and I don't remember any case when it was longer than 10-15 sec.
For delete operation you can expect up to 5 minute delay, because we are waiting for the last log backup to be taken (log backups are taken every 5 minutes). In the future we might initiate tail log backup immediately when the DROP DATABASE is executed, but in the current version Managed Instance waits for last backup.