A lock will prevent someone from surreptitiously adding contraband to your bag without being detected (a slash in the side is very visible).
Not foolproof against getting arrested but you could also stop and inspect the bag contents as soon as you get off the plane (or grab the bag from the carousel) rather than blithely continue on to the airport exit.