I don't think it passes twice. The lists are already sorted so take l1[1,3,5,6,7] and l2[2,3,4,7,8,9]
l1[0] =1 and l2[0] = 2 so the next thing is
result.append(list1.pop(0)) which leaves l1 to be l1 == [3,5,6,7]
the next element to be teste in the if are :
l1[0] = 3 and l2[0]=2 so we take l2[0]
result.append(list2.pop(0)) which leaves l2 to be l2 == [3,4,7,8,9]
The process goes on until one of the lists is empty, in this case l2 will be left and all the remaining elements will be aded to the result list.
In my example result will be
result[1,2,3,3,4,5,6,7,7,8,9], but the lists will have been passed through only once