If you need surgery, you doctor may advise you to see a physical therapist beforehand to do strengthening exercises to help you recover quicker after surgery has been performed. We call that prehab. There is very good evidence that even one or two sessions of prehab can dramatically improve your recovery from shoulder, knee, and hip surgery.
Still using a shoulder example, many patients have already been diagnosed with a rotator cuff tear by their primary care physician or their orthopedist. However, the physician wants a physical therapist to prepare the patient for surgery. This is becoming more common every day. The stronger a patient is, the more range of motion and flexibility they have, the easier their rehab following surgery is going to be. Physical therapists will treat patients with prehab by seeing them in the office and by providing them with at-home exercises as well.
If you have a knee injury, prehab may consist of a single visit or multiple visits to help reduce the swelling around the knee. Reducing inflammation will allow the physician to have better access to the damaged tissue during surgery. Improving muscular strength and range of motion beforehand will allow for an overall quicker recovery period.