The TeX bit comes from Don Knuth as he designed the original plain TeX macros, The TeXBook says
On the other hand, it's important to notice another thing about TeX's
name: The 'E' is out of kilter. This logo displaced 'E' is a
reminder that TeX is about typesetting, and it distinguishes TeX
from other system names. In fact, TEX (pronounced tecks) is
the admirable Text EXecutive processor developed by
Honeywell Information Systems. Since these two system names are
pronounced quite differently, they
should also be spelled differently. The correct way to refer to TeX
in a computer file, or when using some other medium that doesn't allow
lowering of the 'E', is to type TeX
. Then there will be no
confusion with similar names, and people will be primed to pronounce
everything properly.
Leslie Lamport added the raised A when naming his system LaTeX. Originally raising it a fixed amount to suit Computer Modern. For LaTeX2e we generalised it a bit so that the A is raised to align at the top so works to some extent with more fonts, although for display fonts (such as the cover of the companion books) the letters still need to be manually kerned to get the best appearance.
:)
.