The administrator of an environment can enable/disable the option to open documents in local applications of Office. To enable/disable this option as an administrator, go to the settings page. SharePoint documents and in the Office web apps section, enable or disable the "User can open files in local applications".
When this function is enabled, the user has the ability to open files in the web editor or in the local app.
This also applies for the context menu.