Increased liability/lawsuit-exposure seems like an efficient way to do it (certainly better than regulations with very specific criteria around how people should write software)
This liability is already non-zero. I wonder if the penalty fees are too low, or if there's some kind of legal shield that reduces the risk