Insurance and legislation affect how enterprises balance between protecting against breaches and recovering from them.