Who can understand canines?

So I just don’t get it.  I have a wonderfully well behaved dog.  Nothing unusual about her, save her age and the associated issues that are related.  But there is just one thing I do not understand.

Why, oh why, must she dive into the trash can?

I can be at home and not leave the house for four days.  No problems with the dog.  I walk to the mailbox, come back, and the trash bag is wrong-side out (but still in the can) and the trash is all over the house.  I can go to pick tomatoes out of the plant in the back yard and I have got eggshells, tea leaves, bad cheese, and whatever other contents of my garbage strewn all over the kitchen, dining room, and living room.

Why is this?  Is it the equivalent of a 4 year old going into the forbidden candy jar when mommy is taking a nap or on the phone? She is very well behaved at other times, but this just drives me nuts!