The documentation says: $loop(%fieldname%,num) Starts a new loop. The loop data is sorted by the given field name. The optional second parameter limits the loop output to a certain number of entries. This is useful to eliminate duplicate records (num=1)
Admittedly, it is not very obvious but if you do not set a fieldname, then there is nothing to sort by and the order is taken as it is.