have you considered that a person who is in a life situation where turning to crime becomes a viable option is perhaps underestimating the risk and negative impact of either situation?
In that case the threat of prison is also not a deterrent.
Or, both are deterrents but one or both can be weaker than the other depending on the perceived risk by the person committing the crime. Having multiple deterrents should be a greater deterrent as a whole across the average of potential criminals.