For instance, given a bike and a rider, one can adjust seat height, seat position, stem length, handlebarhheight, crank arm length and possible more things to get the correct reach and stem height. However, all that also has to be adjusted to account for body size (limb lengths), mobility etc, in order to level the hips, get the knees correctly over the pedals, aero position, correct weight on the hands, no chafing in the butt etc. It's really an art to adjust everything at once, as fixing one thing affects the others.
So while a bikefit can cost about $300, it's money well spent if one is serious about the biking (and one has then probably spent ~20x that on bike+gear anyways.. ). I'm about to head out for a ~120km ride today, so I've found a bike fit invaluable.