The compare function itself doesn't do any sorting - it just returns whether $a is preferred over $b.
And we can't strictly say that it is applied to MIME types either - it is applied to the array map that we use as a structure to hold the MIME type.