I would certainly take issue with the statement that deterrence is a legal fiction. Deterrence is one of the fundamental principles that we use in sentencing.
Even through anecdotes, oftentimes with young offenders, someone will say to go ahead and do it because nothing will happen if you get caught. Implicit in the message of “nothing will happen if you get caught” is that if something were to happen if you got caught, you might be less likely to do it. There's a reason why an older person grooming someone to commit a crime says not to worry because nothing will happen if you get caught.