Aside from being an invasion of your privacy, I believe that it may even be illegal for a store to demand to check your personal property unless they have due reason to suspect you of shoplifting. This is also true for stores that explicitly warn that you must show your bags when exiting the store, the warning is simply invalid. (Much like a hand written notice which reads: 'All women must display their breasts for photographic inspection by store clerks upon exiting the store.' would be invalid.)

If you are asked to show your bags just keep walking out of the store, maybe ask 'Why? Did you see me take something?', while walking away. The security guard that is asking to check your bags knows quite well that he cannot do anything to stop you leaving. If he obstructs your path or restrains you in any way that can be consudered as assault or false imprisonment, and he knows quite well that if you haven't stolen anything he will surely lose his licence and job. For this reason it is not very likely that he will do much if you walk away.

So next time someone asks to see your bags just walk away, it's not like they can do anything.

Of course if you have actually stolen something then you should probably run as fast as you can, rather than walk away.