What is the function of cartilage in the knee?

The cartilage is there to stop bone rubbing against bone. It performs like a lubricant.