1 in 2 people born after 1960 are expected to get cancer in their lifetime (Cancer Research UK). If you die due to a cancer diagnosis your life insurance policy should pay out.
If your cancer diagnosis was estimated to give you 12 months or less to live, your life insurance policy may payout early depending on the terminal illness clause.
Most people do not die instantly from cancer and rather it is a long process of health challenges, treatment and recovery associated with it. If you got cancer and were not able to work, how would you and your loved ones afford to live? You could consider Critical Illness Cover. This insurance will pay out on diagnosis of a wide variety of illnesses, including cancer (depending on the type and severity).