Is this necessary as it's not a critical action but I see it in a few apps. If so, what are the reasons behind it?
Yes! You should always confirm sign-out in mobile apps.
Mobile is a personal device: When we mean personal - really personal.. others can have limited to no access to someone's mobile.
Account Safety: In order to keep user accounts safe, users generally opt for strong passwords and when you have more than 10 signed-in apps it becomes difficult to remember all passwords.
Security: If a user is signed-out by mistake, signing-in again might involve multiple steps (OTP, email confirmation etc) to get into the app again particularly when you don't remember your password.
Emergency of use: Mostly we use mobile apps when we need them (excluding games to some extent) such as; to perform a money transaction. Imagine a situation - you're buying something and at the same time you have to board a plane but you accidentally signed-out of Apple Pay and have to go through the tiring process of authentication again.
This happened to me recently -
I booked UBER with an intention of using PAYTM as payment method. I opened the app and because of slow internet connection in that area I tapped on the profile icon multiple times - suddenly PAYTM signed me out and asked to sign-in again. I didn't know the password of it - I chose forgot password option - PAYTM sent me an email - it took a lot of time for the email to arrive in my inbox (because of the slow internet) - then there was OTP too. Finally I gave up and paid hard cash.
It's to make the user "think twice" or to prevent mistake since sign-outs increase churn rate.
More information about confirmation messages can be seen here: http://www.uxdesignedge.com/2010/06/are-you-sure-how-to-write-effective-confirmations/
According to that article, the confirmation for sign-out can work on these scenarios:
- Prevent the error
- Provide feedback
- Provide undo
- Make results easy to change
Although the action can be "undone" (signing in again), sign in is not the most convenient process as you have to enter the email and password (considering you find out the correct password).
I guess in Mobile it is easy to tap somewhere by accident, the screen is smaller than a desktop and a tap can happen accidentally.
So combine the above arguments and you have a good reason to include a confirmation dialog for the sign out. I guess if the sign in is done easily through a Social Network or similar you might consider not concluding a confirmation.