: Logically, the answer would be: because "Apple" precedes "Orange" in your english dictionary.
: In the computer world, the relation is "<" because the ASCII/Unicode char code of "A" is lesser than the one of "O".
A little bit more info (technical):
You can think of it as a number.
Since each letter (and every character) has a number that it relates to as a byte and every number has a number for each byte, they are essentially interchangeable to some extent.
C A K E
67 65 75 69 'Decimal
43 41 4B 45 'Hex
43414B45 'Hex - combined
1128352581 'Dec - combined
In my example, each letter is translated to it's number value and then to hex. With hex, you can simply scoot the numbers together. Then translate back to decimal.
CAKE = 1128352581
TREE = 1414677829
As you can see, TREE > CAKE.
However, to make matters more confusing, A <> a when using mathematical comparisons. So even though the dictionary would list "bed" before "Cat", a comparison like this puts "Cat" before "bed". Lowercase letters come after uppercase ones.
Enjoy! <twisted grin>