What is the function of shark cartilage?

None. Sharks don't get cancer so various sources sold shark cartilage in a pill. How this was to treat cancer or prevent it has no merit or obvious reasoning.
Joint health... People have said that shark cartilage is great for joint health. Some have said that is has uses in the treatment of arthritis and even certain types of cancer.