What happens here is that 5 and 2 treated as an expression that evaluates to 1. However, it should not produce a result sorted by the first column.
Actually, I think that you only get sorted data, because you inserted them into a sorted sequence. Take a look at this SQLFiddle:
http://sqlfiddle.com/#!2/3e04e/1
Data is not sorted by any of the columns , sorted by value 1 .
source share