Without Javascript, clicking on the logout link on desktop will take you to an interstitial where you have to press a button to log out. (This is to avoid writes on a GET request, and to some extent for CSRF security.) With Javascript, the logout happens via an AJAX request (added in T222626) and the user does not see the interstitial.
For mobile the same thing was not done - clicking logout takes the user to the interstitial (regardless of Javascript being enabled/disabled), which is not great UX.
Developer notes
Per the direction in T232734#5501722 we will copy/pasta the code from core into Minerva.
Code that has to be used here can be found here: https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/506386/