If you're having a car completely repainted, the shop should use a metal conditioner on the bare metal, which etches the metal to eliminate microscopic rust and corrosion. Some body shops also use self-etching primers to fight corrosion. If any welding was done, special weld-through primers are applied before the pieces are welded.
If the shop needs to fill scratches and minor body imperfections, the best shops use epoxy-based high-build primer surfacers instead of using lacquer putties and fast-dry lacquer-based primer/surfacers (which can shrink to revealing scratches not long after the car is painted). These new-age primers fill scratches in one or two coats, never shrink, adhere better and are much more durable than other primers.