Around 1994, Sun Microsystems and Lucid Inc. decided to cooperate on a version of Emacs, distinct from that maintained by the Free Software Foundation. Lucid Inc. had been writing a version they called “Lucid Emacs”; Sun had been sponsoring something called “Epoch,” another version of Emacs.
XEmacs was chosen for the merged project to avoid explicitly favoring either company. There hasn’t been a good reason to change the name since then, especially since no other formal body has taken over the project.
The X in XEmacs occasionally confuses people. It doesn’t mean that the program can’t be run in a terminal, nor that GnuEmacs can’t take advantage of X11. XEmacs can be used in TTYs and under X11—occasionally at the same time, using GnuClient—without problems.