These 2 lines are included in latex.ltx
:
\DeclareTextSymbolDefault{\textless}{OML}
\DeclareTextSymbolDefault{\textgreater}{OML}
What this does is define these two commands so that they use the currently active font in the OML
encoding, which is primarily used for mathematics. Hence, they do not rely on the OT1
encoded fonts at all.
When you use the T1
encoding, these defaults are overridden:
\DeclareTextSymbol{\textgreater}{T1}{`\>}
\DeclareTextSymbol{\textless}{T1}{`\<}
which ensures that the commands use the currently active font in the T1
encoding. Hence, if you use different fonts for mathematics and text for some reason, these commands will behave as expected with T1
but not with OT1
because, in the latter case, the mathematical font will be used even in text mode (because the symbols aren't otherwise available at all).
Similarly, the default definitions for \textbackslash
and \textbar
use OMS
, another mathematical encoding, and, again, if you load T1
, these are overridden to use the T1
encoded font.
All of this was necessary because originally, TeX could only use font encodings with 128 slots. T1
has 256, a number which only became possible later in TeX's development.
Note that one reason for substituting these characters in OT1
rather than, say, putting ¡
and ¿
in an alternative encoding instead is the dependence on ligatures described in egreg's answer. TeX can only use ligatures within a single font encoding. So if, say ¿
had not been in OT1
, it would have been impossible to make
?`
produce ¿
, for example, without also putting ?
and ` in the other encoding. Because kerning information can only be used for character pairs within a single encoding, that, in turn, would have made it impossible to have appropriate kerning for characters preceding or following these symbols.