I would like to add some more points.
You can also take database offline if you are removing that database. Often we have scenario where we have some old databases lying and we want to know whether it is actually accessed or not in that case you first drop mail to respective stakeholders that you are taking database offline and then after some time you do it. If some one or some process really needs it the query or job would fail and people would come to you with their issue. I have found this very useful.
Other is when you simply want to move database related files from one physical drive to other, after you have run alter
database command to move data or log files.
Sometimes in emergency situation where you can see some virus/bug coming from your app and to safeguard data you either disable login through which app is connecting or take database offline so that you can stop data compromise.