You can't drill a hole on the sensor and mount lens body on it, and lenses must be placed at exactly focal distance away for parallel beams to converge on film or farther for diverging beam(from non-infinitely-far objects), so body designers pass a distance measurement from film to a known feature(mounting ring top surface) to be able to design a lens barrel. That's the flange-focal distance, sort of a "design length of body" to subtract from your overall lens barrel length.
It's actually possible to drill a hole on the PCB and woodscrewing lens directly on in cases with webcams and CCTV cameras, and in those cases the distance is 0.