The octave definition is pretty arbitrary. You may like to consider which of the following properties it satisfies:
!x<x
x<y & y<z -> x<z
For any x,y then one of the following must hold: x<y, y<x, x=y
If x<y then x+a<y+a for all a
If x<y and a>0 then xa<ya.
In fact, it can be proved that there is no possible ordering on the complex numbers which satisfies all of these (that is, makes the complex numbers an ordered field). So you can pick any ordering you like, and decide which of the above ordering properties you're prepared to live without. One standard ordering is lexicographic, which can easily be adapted to quaternions:
a+bi+cj+dk<A+Bi+Cj+Dk iff a<A or, a=A and b<B, or a=A,b=B and c<C, or a=A,b=B,c=C,d<D.
(This won't satisfy the last property above).