Security is the ❤️ of any application but sometimes we need to balance security with usability. Sometimes you want to allow users to access a resource with a lower level of authentication by just entering username and password. But if the user wants to access a resource with a higher level of authentication, then you want to ask the user to enter a second factor of authentication.
For instance, if you are building a money transfer application, you want to allow users to view transaction history or adding a new beneficiary with just a username and password.