The softer surface does it. Even treadmills that have no extra built in shock absorption are generally kinder to the knees. The deck eases during landing and helps you push off at the end of your stride. If you find that running outside is causing you knee pain or you're returning from an injury then a treadmill may help bring you back to running normally.
Some treadmills have extra built in absorption decks that are ideal for runners who have trouble with their knees. Many brands and manufacturers have these, they often give the deck a special name in relation to the performance it has. One calls it a "cushion flex suspension system" and these all help reduce the amount of impact from landing.
A treadmill can still damage your knees
You still need to take care of your knees and lower leg to help prevent injuries. Because the treadmill controls your speed depending on your choice it's better not to start too quickly. Make sure you gradually increase your pace so your knees get used to the speed and you don't jar them with an unnatural motion because the speed began too fast.
Use proper form by looking up and not leaning forward. Land on the balls of your feet so the shock is absorbed more naturally so you don't land on your heel. You need your knee over your foot as you land to aid the knee in it's natural job as the shock absorber to the body. Don't run too fast or too long to prevent overuse injuries to the knees.
New research shows a degree of help to the knees by running
In this research they took blood and synovial fluid (lubricating liquid from the joint) from the knee before and after some healthy runners ran 30 minutes and a control group who sat for 30 minutes. It was a pilot study and there is so little of the specials fluid that they had to discount all but 6 subjects. They found an decrease in the pro inflammatory cytokine concentration in their samples. This is good for the knee.
The number of people who took pat make it only a pilot study and they can't draw any conclusions but the first results are promising. Running does help the muscles around the knee and help those who may develop osteoarthritis. We will have to wait for further research and ways to measure the benefit or not of running and it how affects the knees before we know more.
Do be careful of any knee pain even from treadmill running. If you get a dull pain behind the knee this could be cause by running and is a sign that you need to do some strength training in the legs. It could be due to a muscle imbalance that training could solve. Strength training for the whole body is good for runners and something the CDC recommends.
If you get any other knee pain it may be best to have a couple of days rest. For such an important part of the body for exercising you don't want to make it worse. You may need to rest, ice, compress and elevate (RICE) the problem area. If you're overweight and running you need to take extra care with running at any speed for the stress you'll put on your joints. Otherwise with care running doesn't have to be bad for your knees.