Sometimes checking bags is unavoidable. We spend two months at a time in the South Pacific, and inevitably have some kind of food substance or toiletry supplies in checked luggage that cause a hand inspection every single time. We now know, from long experience, which items cause suspicion (canned tuna and peanut butter, for example), and try to pack those items as close to the top as possible (and protected in zip-loc bags), to avoid everything in the luggage being pawed through and arriving topsy-turvy.
Also, if we are traveling with multiple pieces of checked luggage, we try to keep all the "suspicious" items in one bag, to avoid multiple searches of the other bags.