If locking up the criminal will only make it worse, then do something else. Take the crime as an opportunity to remove them from their criminal environment. Or let them do community service. There are tons of better options than locking people up.
But intentionally doing nothing about theft is just harmful. It rewards the crime and breeds vigilantism.
I believe your point is based on a false premise: that people commit crime because they don't see a better option.
A lot of times people commit crime for the same reasons they eat unhealthy, fight with their family members, and get addicted to harmful behavior. They aren't thinking long term and they don't care about the consequences that much.
There is no political or economic system that you can design that will keep people from being stupid.
There are different reasons why people commit crimes. Some do out of need: they don't see a better option. Others do so out of opportunity: it's easy and they can get away with it. And I suppose a rare group does it out of a commitment to pure evil.
I have very different degrees of sympathy for these groups. The first group needs access to better options. The second group needs to be held accountable. The third group cannot really be allowed to participate in our society.
In certain jurisdictions the ideological pendulum (closely followed by official public policy) has swung a little too far toward idea that criminals have no agency and are victims of an unfair system that forces them to commit crime to get by and that prosecuting minor crimes is a path to further criminality.
The idea is that by not prosecuting certain crimes we can prevent people from becoming criminals at the ground floor which will prevent them getting stuck in a loop where they can't get a real job and have to commit crime to survive and become a career criminal. While this is not totally baseless and is something I generally agree with there's a categorical difference between applying this thinking to victimless crimes and crimes with a victim (a trap which pretty much all real world implementations fall into).
In the case of petty victimless crimes where there's disagreement over whether or not the crime should be a crime at all (e.g. weed possession) having a don't prosecute by default policy is fine IMO. For petty crime with a victim that pretty much everyone agrees should be a crime (like petty theft) having a don't prosecute by default is stupid because it increases crime in order to score political virtue points for the people who implement it at the expense of the community as a whole (I'm looking at your SF and your failure to prosecute minor property crimes, yes I'm fully aware this will not be a popular opinion circa 9am and 12pm West Coast time).