You probably feel pretty proud of yourself when you remember to bring reusable shopping bags to the grocery store. And you should — reducing the use of plastic bags is an environmentally friendly thing to do. But bringing your own bag has an unintended consequence. It can influence your food purchases in ways you probably don’t realize.

And unfortunately, the influence is not an especially healthy one.

Bringing your own bags changes the way you shop.

The problem is that when people bring their own bags to the grocery store they feel entitled to throw a few junk food items in the bags along with their organic milk and veggies. It may not be conscious, but it happens, according to a new study published in the Journal of Marketing.

Researchers were able to identify shoppers who usually brought reusable bags to the store and compare their purchases on days they used their own bags to days they didn’t using data from loyalty cards at one store in a large chain of grocery stores in California,.

People who used the environmentally friendly bags were more likely to buy organic foods — not a surprise there — but they were also more likely to buy junk food. If there was a child along, both results were a little less likely. Parents are more concerned about being a good role model with kids in the cart and also tend to temper their own food purchases with their desire to serve their children healthy food.

“Grocery store shoppers who bring their own bags are more likely to purchase organic produce and other healthy food. But those same shoppers often feel virtuous, because they are acting in an environmentally responsible way. That feeling easily persuades them that, because they are being good to the environment, they should treat themselves to cookies or potato chips or some other product with lots of fat, salt, or sugar,” the authors, Uma R. Karmarkar of Harvard University and Bryan Bollinger of Duke University write.

“I Deserve A Reward”

When we do something good, we often give ourselves permission to indulge a little. After all, we earned it. It's a concept known in social psychology and marketing as “licensing.”

People who used the environmentally friendly bags were more likely to buy organic foods — not a surprise there — but they were also more likely to buy junk food.

“[B]ringing your own bags changes the way you shop,” the researchers say. And the results could have useful implications for grocery store managers: “In stores where reusable bags are popular, marketing organic or sustainably farmed foods as indulgences could increase the sales of those items.”

Go ahead and feel virtuous if you bring your own shopping bags. But be aware you may be undermining your efforts to eat healthy when you reward yourself for your good behavior by also slipping a carton of ice cream into your “green” bag.