More correctly, fundamentally software can never know when its rules should be broken.
Computers are just state machines, without determinism and a few other properties they do not perform work. Determinism means there is only one next possible state/action.
Breaking rules would imply there are two or more possible states or actions, and that is a class of problems that computers cannot solve (they talk about this in compiler design courses). Most people subscribe to magical thinking because they don't know how computers work, or what they are even.
Computers are just state machines, without determinism and a few other properties they do not perform work. Determinism means there is only one next possible state/action.
Breaking rules would imply there are two or more possible states or actions, and that is a class of problems that computers cannot solve (they talk about this in compiler design courses). Most people subscribe to magical thinking because they don't know how computers work, or what they are even.