Banks invest because that is exactly how they profit.
Some investments may be riskier than others, which is where insurance comes into play. Banks will carefully review insurance policies for higher risk investments in order to confirm that the insurance policies will be able to be paid in the event of an unfortunate event.
If everything is in order, investment proceeds.
Insurance companies will sell insurance because that is exactly how they profit.
If the risk is high, the cost of insurance increases in accordance with the risk as determined by actuaries. Unpredictable things happen, of course, and losses are sometimes incurred. In that event, the future rates are increased in order to recover these losses - as undesirable as this is for their customers.
If the risk is deemed too high, however, insurance companies may simply decline to provide coverage. The knowledge of risk outweighs any potential profit and the potential negative effect on their customers.
If it is a foregone conclusion (aka "they know") that a catastrophic event is imminent. Then coverage will be declined.
(But, you already know all of this.)