I worked for 5 years at a bike shop, and we did "fittings" (no charge unless you choose to switch a stem or seatpost etc) We would typically do the fitting little adjustments at the time with the bike in a spinner so the user could feel the changes for real as they happened.
Fit is important for pretty much all types of riding because not all people all created in equal proportions. Even in trials riding, without a seat, fit is important.
If finding a new bicycle/frame we would:
Find a frame/size/geometry that properly fits a persons body type and riding style.
For instance we had quite a few woman come in under 5' 4" who wanted to ride road and couldn't fit properly on a conventional 700cc road bike. But you put them on one of the 650cc road bikes made specifically for woman by many companies and the fit worked better. Similarly there are some frames made specifically for woman in Road/MTB with a shorter top tube. Because women tend to have longer legs and a shorter torso for the same height they may be too stretched out a normal bike. A shorter stem may help, but will throw off the handling of the bike.
Typically road bikers would want about 1" of clearance between the top tube and crotch when standing. XC 2-3". BMX/DH/Freeride/trials/anything super aggressive 5+"
Ok... these are adjustments that can be made on any bike, new or used.
Seat height: If the seat's too high you bottom out your knees and cause damage, too low you can't harness power. Height depends largely on riding style. There are million ways to calculate this, they all get about the same thing. Generally for max power your leg should be straight when your heel is on the pedal, create the slight bend when the ball of the foot is properly placed. Slightly lower for mtb etc.
Seat position (forward/back):
The seat position forward/back changes the angles of your leg/knee when pedaling. We generally had a norm and would change it slightly for people looking for spring/velodrom stuff or cruising. Generally speaking when your knee is in it's furthest forward position (i.e. pedals parallel to the ground your lower leg should be straight up/down)
Seat angle:
with rare exception parallel to the ground
The seat itself:
Not all rears are the same. Depending on time in the saddle, age, body positioning etc many people getting into road bikes may choose to use a slightly heavier less aggressive seat for a period of time. There is a major nerve/blood vessel that travels right under the tailbone and some seats have slots/holes to relieve pressure. There are male/female versions. Similarly "shock" seat posts may be used especially for people with back pain or spinal issues.
Stem height/angle:
This varies largely on what type of riding and how aggressive of a body position the rider wants to achieve. A weekend road warrior may not want to be hunched over as much as a pro-racer. Or a cruiser may want to sit almost upright. Changing stem height/angle brings the bars to where you want them.
Bar angle/width:
This is fairly obvious with road bars. Flat bars typically have a little rise and upsweep and back sweep. If set up wrong this can cause wrist issues. Along with this goes changing the lever angles: the angle should be such that the wrist is under no strain in the most common position. Bar width can be changed especially for people with narrow shoulders.
Bars:
We may choose to change bars (if you the user want to spend $) to get a width/sweep/rise combo that fits best.
If you find a seat you love and bars that fit perfect, carry them onto your next bike. It's worth it.
Clipless:
Center the cleat properly. Set up the release tension. Also coach the rider in how to get in/out
Pedals:
the pedals can be changed for preference if the rider wants to.
Brake lever reach:
Depending on how long your fingers are you may want to bring the levers back (I do). You may also want the contact the be closer or further from the bar.
Gearing:
A rider may need changes in gearing to facility riding ability/terrain/style. This can happen. It may be pricey.
This is the pretty extensive fitting we would do for free (parts excluded) for every single person who bought a bike at our shop and had the patience to hang out for a little bit/maybe come back when we're less busy. I can't believe shops charge for this.
It can make a HUGE difference in comfort/feel. If you have a odd body type this would be doubly important.
I greatly encourage women to find shops that offer female specific geometry and the time to help them out. You aren't built the same (thankfullly) why would you ride the exact same bike? It will make a difference in your ride.
Sorry if it's long: