The insurance companies make profit through risk assessment, spreading the risk over multiple people and investing the collected premiums. Usually, insurers will have mathematical tables and charts that help determine the statistical risk. Assuming a certain number of policies will be paid out the insurance companies can get an idea how many policies will never have to collect and that's money the insurance company gets to keep. The insurer can also minimize the risk of having to pay out on a policy by excluding certain situations the policy won't cover.
Source: