As you'll soon learn, some travel bag locks aren't that reliable. If people really wanted to get into your luggage, they'd be able to with something as simple as a ballpoint pen.
Whether you're flying or storing valuables in your luggage for whatever reason, other people can get into your bag by jamming a cheap ballpoint pen into the zipper, prying it open and taking anything that's easy and in plain sight. It's really that simple for some bags.
If you're really concerned about keeping your belongings safe and can't bring it in your carry-on bag, you can use a cable lock to first loop through your luggage frame (if possible) and then through your valuables. If you can't thread the cable lock through an item, place it in a bag with a double zipper that you can thread the cable through.
This doesn't completely prevent theft. It buys you some time. The logic goes, if it's too much of a hassle for someone to steal your stuff, they may not think it's worth the risk. Keep in mind, though, that airport security such as the Transportation Security Administration (TSA) in the US will have no qualms about bypassing or cutting your locks and anything else if they have a reason to investigate further.
Breaking into a Suitcase With a Ballpoint Pen and What You Could Do About It [ITS Tactical / Imminent Threat Solutions]