That is exactly why I have an electronic pet door, so only my two dogs and the cat (wearing thir collars) can use it. I have chickens hanging around the pet door trying to figure out why it won't open for THEM. If a house door is open, those chickens will sneak in to eat dog food... Until one of them objects.
My BO's know that treats come from the garage too. I have to close the door behind me but I forget or refuse because I'm afraid of getting locked out. One time, I was cleaning out their house and waterer, so I was back and forth. I went into the garage to get something and heard a strange sound. I stopped and looked around and then heard it again. My BO had used my husband's weight bench to get up onto the work table where I have a meal worm farm. A meal worm farm that didn't have a lid.
She was standing in the middle of the farm PIGGING OUT!!! I picked her up and thought her crop was going to bust open. She must have eaten a few hundred meal worms before I found her.
Needless to say, I finished my chores outside and immediately made a lid for the meal worm bin so that never happened again. But to this day, she still follows me into the garage EVERY TIME I go in there.