If I had a rupee for every time a doctor said this to a client/patient, I could probably afford a few tomatoes to pelt at the vague recommendations from authority figures.
What determines if a muscle needs strengthening? I have seen clients belting out squats, jumps and lunges producing oodles of force to power those acts. They occasionally have aches and pains. But clearly these are not a result of weakness.
That is fundamentally what muscles do: produce force. How much more force does the patient need to produce for their knees to be pain free? Is it twice as much or thrice? Or do they need to channel the force against an immovable resistance to produce a different response in the muscle? Or do they actively fight against the force of gravity as it pulls them down to earth?
Different contractions produce different responses in the body. Doing thousands of reps is often not the answer. Producing more force alone might not solve a thing. Rest can often be counterproductive. Selecting the right exercises and providing the right amount and profile of resistance can make all the difference. To address an ache in the knee, you might need to look at the hip and/or ankles. Needless to say all of these are starting points. Question is does your medical professional know this? And how clearly are they communicating with you about how they arrived at their recommendations.