How does 3D Time-of-Flight (TOF) camera work?
The (unwrapped) phase between two constant same frequency signals is linearly related to any delay between the two signals.

Measuring phase of a fixed frequency periodic signal over many periods is sometimes more accurate than trying to detect delay locally (by zero crossing, etc.)