Seriously, if you don't secure your possessions, you will eventually lose them. Even though most homeless people are good people, in any crowd of thousands, there are bound to be some people are not going to be your friend, are not going to look out for your best interests, are not going to care about you. They will steal your things if you give them an opportunity. It's the same as with any other segment of society.
Still, there are things that you can do to protect yourself and prevent most potential loses. And when you are homeless, any loss can be a big setback, so you should be even more diligent in protecting your things.
As this video shows, you should use a back pack that has double zippers with tabs large enough that you can lock together with a suitcase lock. Suitcase locks are sold at Walmart and other stores, usually in packs of 4 or 5. And they can run anywhere from 5 to 12 dollars, depending on the brand. I always get the cheapest, they seem to work as well as the more expensive brands. If someone finds your back pack, those locks will prevent them from rifling through it, as least for a while. And get a master lock, so to secure your entire back pack to a fence or other structure, so that no one can just walk away with your back pack. Sure, if someone had a knife they could cut into the bag, but that would require more time and effort. Most people who steal from the homeless, are looking for a very easy and non-confrontational experience. The more difficult you make it for them to take your things, the more likely they are to not even bother trying.
Also, understand that the tactic of locking your backpack to a fence only works in certain scenarios. Don't expect your bag to be secure on a fence for a whole day. Most likely a property owner or the police will see it and will confiscate it. I would do this only while sleeping near my bag.