That is a parallel to the "we don't need laws against abortion, we need to change hearts and minds" (paraphrase) position.
The fact is, laws affect behavior. Are laws alone enough? No. Social conditions too must change, and popular sentiment also.
But judicial rulings, and then laws, are a critical part of the mix.
I don't think your analogy is a good one here: when I was a child, the "don't touch the hot stove" rule didn't really stick until I touched the hot stove. That was, in and of itself, punishment and 'education' enough.
In general, though probably not with abortion (for obvious reasons), I think it's better for society to try to moderate people's self-destructive impulses rather than block them completely. It's a tough balancing act, but the goal should be to minimize the harm people do to themselves while ensuring that the bulk of the harm that does occur is caused by people's self-destructive behavior, and not by society's efforts to prevent it.