Yes you are right list() only works on numerical arrays and assumes the numerical indices start at 0. but he reason why your code is working its because of each.
each traverse an array therefore converted the keys to numerical example if you run the following :
$foo = array("r"=>"a");
$bar = each($foo);
echo "<pre>";
print_r($bar);
Output
Array
(
[1] => a
[value] => a
[0] => r
[key] => r
)
You can use that array('r' => 'a'); has been converted to array(0 => 'r', 1 => 'a'); therefore you can now use list since they now have numerical keys
FROM PHP DOC
each Return the current key and value pair from an array and advance the array cursor.
each Returns the current key and value pair from the array array. This pair is returned in a four-element array, with the keys 0, 1, key, and value. Elements 0 and key contain the key name of the array element, and 1 and value contain the data.
Also
each() is typically used in conjunction with list() to traverse an array, here's an example:
list() only works on numerical arrays and assumes the numerical indices start at 0.