> xdg-open, which as it turns out opens text files in Firefox, even though light weight editors are present on the system.
It opens text files in Emacs here – did you configure your system to associate the text/plain mimetype to Firefox? (The following mostly for anybody who is interested):
$ xdg-mime query filetype <file>
will print the mimetype of <file>. $ xdg-mime query default <mimetype>
will print the default .desktop file associated to this mimetype, i.e. the application that is run if you do xdg-open. That application can be changed using $ xdg-mime default <.desktop> <mimetype> [<mimetype>*]
Maybe that particular distribution was misconfigured to have the default for text files be Firefox, but overall I don’t find the behaviour particularly surprising.