your analogy would be fitting for a jurisdiction that had no sexual assault laws or way for victims to defend themselves. In which case "Don't provoke an attack" is sound advice.
in other industries, you can sue product manufacturers if their defects cause you inordinate grief, lost wages, or excessive repair costs.