People who want to crime do tend to avoid places where the police are more aggressive with enforcement. E.g. you don't really want to do petty property crime in Bellevue Washington when more tolerant Seattle is right across the lake.
The same problem exists for "getting care and shelter" in that the problems themselves are hardly immobile, while the solutions are expected to be provided locally.
This is a very valid and important point. It also causes knock-on effects that are aggravating factors. The important subtlety in what you are stating is: People don't consider punishment when they're committing crimes but they do absolutely seem to consider the likelihood that they will be caught (hooray for the complexities of being human!).
So we end up with densely concentrated areas of crime in places that are "soft on crime". But it's very clear that the solution isn't increasing police presence in these areas, if it were that simple NYC the 80s would have been crime free. The solution is to fix the problem at its core but to do that we need to agree to cooperate on a broader scale... with something like a federal government that can enact wide policies to create incentives for these things to end. This is how it works in "crime free" japan. But we seem to have given up on federal solutions to these things ages ago.
You can definitely push the problem somewhere else with more aggressive policing, but that relies on a soft on crime area nearby or rather popular as a place to push it to.
China is "crime free" also, but the hammer hits really hard so really it is either just very well hidden, or accepted by the police informally (e.g. tea scams, red light massage parlors).
The same problem exists for "getting care and shelter" in that the problems themselves are hardly immobile, while the solutions are expected to be provided locally.