I was just curious if there was some law or regulation somewhere that stipulated that an insurance company had to be a for profit business? If you had the capital to cover the costs, could you run a insurance company as a npo and funnel profits into a cost sharing fund or something like that?
No, there is nothing preventing non-profit organizations from offering insurance. Indeed, this is quite common in health care, with non-profit health insurers accounting for over 60% of health plans with more than 100,000 people enrolled (https://www.firstquotehealth.com/health-insurance-news/non-profit-health-insurance). In the 2012 Consumer Reports health insurance ranking, all of the top ten private plans were nonprofits.