It relies on the fact that the width of the iris remains relatively constant for a wide range of the population. Using that information we can calculate the approximate pupilary distance in mm of the person.
Reference: https://ai.googleblog.com/2020/08/mediapipe-iris-real-time-iris-tracking.html