The reference is usually the rotary table or the kelly bushing. Hydrostatic pressure, pore pressure, and fracture gradient all use this depth, because a fluid column cares about vertical height, not the length of the hole.
A point at 10,000 ft of measured depth in a horizontal well can be far shallower in true vertical depth. A mud weight that is safe at that vertical depth can be wrong if someone multiplies it by the measured depth instead. Subsea depths are the same idea with mean sea level as the datum.