risk = size of punishment * probability of being caught.
So how do you deter a potential criminal who is unlikely to get caught? You have to jack up the size of the punishment to compensate for that low probability.
Economist Gary Becker started this school of thought in the 60s and it's been implemented and debated in a million ways since then. Example: https://masonlec.org/site/rte_uploads/files/JEP/Readings/But...