Insurance companies work almost similarly to banks. Banks collect money from the depositors and give them some interest on their deposits. The banks then lend the money collected from depositors to the burrower for a higher interest. The difference between the interest they give to the depositor and the interest they charge to the burrower is their profits, and there is really huge gap between these two different interest rates.
Insurance companies, on the other hand, collect money from the insurance buyers in the name of premiums, make these insurance buyers pay the premiums for many years, and in the meantime invest the money in big projects. Insurance companies are not giving free money to the insurance buyers, in fact, they are collecting money from insurance buyers and investing in profit-generating projects. Insurance companies are also investment companies. They are not established as a non-profit organization; in fact, they are here for making profits.