But if we simply take away consequence now no one has any reason not to steal, and then more people will steal. It may not deter all people but fewer people will be willing to gamble if the odds of facing consequences go up.
The alternative is to view it as inevitable and therefore don't do anything, but then those not doing it fall behind those doing it and suddenly those who weren't stealing before now feel like losers for not doing it because no one was facing any consequences and because they held back they are now worse off.
People who feel they have nothing to lose don't care if they get caught either.
The solution is to provide people with a decent life by default. They can then contribute to society comfortably.