As usual there is more to it than meets the eye.
Surgeons take a long view when advising on joint replacement surgery. These operations have a limited lifespan and each successive operation is technically more difficult and has a much poorer outcome. The other thing they consider is the demand you will be placing on the new joint. A 40 year old does more walking and exerts higher forces by doing more stressful activities than a 65 year old. This means that the lifespan of the joint replacement is likely to be less.
I like to compare the replaced joint to another mechanical object, the car.
You don't expect a car to last forever. It is likely to last longer if owned by a nice little old lady who rarely drives and when she does, it is for short distances in a careful manner. It is likely to suffers significantly more wear if driven aggressively and frequently over long distances by a 40 year old man.
Modern prostheses are made of very durable materials and last for many years. The same unfortunately cannot be said about your bones. No matter how good the materials of the knee replacement, they still have to attach onto your bone. When joint replacements 'wear out' - it is often the bone, not the prosthesis that gives. The result is loosening of the prosthesis and revision surgery is required.
Revision surgery is not a repeat of the first operation. More bone is cut away and longer stems inserted into the bone. Knee range of motion is likely to be less following revision surgery, and the complication rate higher.
This is why surgeons do everything they can to delay the initial surgery despite your pain. A primary knee replacement at 40 could mean revision by 50 and mobility threatening complications before 60. Of course this may not happen, but the risks should be understood before any big decisions are made.
You can always opt for surgery later, but once its done, you can't undo an operation.