You may do it once but doing it repeatedly will surely feel tedious. But rooting and unrooting your device is a lengthy process.
Now, to run that application, you may choose to unroot your phone, work on that app, and re-root your phone using Chainfire SuperSU. But whenever you open the application you get the notification that says something like “Your phone isn’t rooted and you won’t be able to use this application on your device”. Suppose you want to run a banking application. Let’s understand what is Magisk with an example.