I've walked through a bad neighborhood or two and came out without any damage, but I make a point of either avoiding such areas or being "prepared." I think it is that way with bears as well. Don't get comfortable with them just because you have had previous good experiences, or been lucky. Every bear is different, and they can change in a heart beat. I lived in Alaska for 12 years and spent my fare share in their company.
I won't argue a weapon vs. spray, because weapons are not an option for some, and most don't train enough to make the weapon worth much more than a stick... But that aside, the below article is a good one. Best part of it is that it digs into the scenarios of each incident.
I carried my preferred bear protection device with a backup in my pack (in case of multiple deployments of first device - trust me its a possibility) and had my wife carry a small marine boat horn on the chest strap of her pack. The intent of the horn was to buy me seconds to reach, draw, and deploy my device; or to hopefully scare the bear aware. Have been around the horn usage a few times on a river and seen it work; but worry that after a while the bear will just get used to it and ignore it. All I am hoping for is just a few seconds of additional reaction time on my part. In an incident, seconds are often the difference maker.....
As for camp, Bear fences around the camp always helped me sleep better.
https://gunwatch.blogspot.com/2018/02/defense-against-bears-with-pistols-97_25.html