A weekend visit to Philadelphia came complete with an up-close view of just what the city's soda tax, which was intended to expand pre-kindergarten in the city and went into effect last January, means to consumers. It is one thing to hear about a tax of 1.5 cents per ounce on everything from sweetened and sugar-free soda, iced tea, sports drinks, sweetened coffee drinks, some fruit juices (with less than 50% juice) and even plant-based milk, and yet another to see it in action.

A penny-and-a half per ounce may not sound like much, but a visit to the soda aisle of a city grocery store demonstrated otherwise. A two-liter bottle of soda that normally would sell for $1.39 was marked up to $2.40; the sales tag prominently displayed that the Philly Beverage Tax Recovery of $1.01 was included in the price. I've never seen a soda aisle as disheveled as this one, as if it was not stocked and/or consumers no longer were interested.

Indeed, the tax has not quite worked out as intended. The city estimated that the tax raised $39.3 million in its first six months, 8% below the $42.6 million estimate. Moving ahead, the city said it hopes to raise $7.7 million per month from the tax, but there is a myriad of statistics showing that sales of the affected products have dropped considerably.

For their part, beverage giants Coca-Cola Co. (KO) , and PepsiCo Inc. (PEP) have reported job losses as a result of declining sales in the city. However, don't worry about the companies themselves; soda buyers have flocked to stores just outside the city -- and there are plenty of them -- to make their purchases soda-tax free. Within the city, Pepsi reportedly had stopped shipping two-liter bottles and 12-packs of beverages, instead stocking shelves with one-liter bottles; the logic is smaller units, less tax (although the tax math, 1.5 cents per ounce, still works the same no matter the package size.)

Buried within this debacle is an economic principle that Philadelphia officials were either unaware of or did not believe. Consumers will find a way around an onerous tax, especially if the same products are available tax-free in the surrounding areas. Resistance to the soda tax is growing, and an organization called "Ax the Bev Tax" is making the case, and even had signs displayed within the grocery store I visited.

The whole notion of the tax grew even more ridiculous as I wandered around the store. A gallon of zero- calorie green tea with ginseng was priced at $4.42, which included a $1.92 tax.

However, for 99 cents I could buy three packs of unsweetened Kool-Aid -- enough to make 1.5 gallons of beverage -- after purchasing a bag of un-taxed sugar. Or, I still could get my sugar fix by buying a few bags of Swedish Fish, Starburst, or any number of candies at regular prices. I'm not sure the Philly officials thought this one through, or maybe they did, which is even scarier.

Consumers will find a way around oppressive taxes. In a similar vein, if there is a perception, real or imagined, that laws will be passed that are intended to take something away or put greater regulations in place, there will be a run on that item. Look no further than the ammunition "shortages" in recent years and runs on guns -- certainly not the intent of the politicians, but a direct result of their public statements.

I'll bet the Philly Beverage Tax is ultimately pulled; the entire debacle ultimately will be a case study in free-market economics.

More of What's Trending on TheStreet:

(This article originally appeared at 11 a.m. ET today on Real Money, our premium site for active traders. Click here to get great columns like this from Jim Cramer and other writers even earlier in the trading day.)

At the time of publication, Heller had no positions in the stocks mentioned.

More from Investing

Data Regulation on FAANG's Could Just Be Underway: Cramer's Investing Teach-in

Data Regulation on FAANG's Could Just Be Underway: Cramer's Investing Teach-in

3 Things Investors Can Do to Stay Strategic When the Market's Volatile

3 Things Investors Can Do to Stay Strategic When the Market's Volatile

How to Be a Tactical Investor in the Current Market

How to Be a Tactical Investor in the Current Market

Canopy Growth CEO: Here's What the Future of Cannabis Looks Like for Investors

Canopy Growth CEO: Here's What the Future of Cannabis Looks Like for Investors

A Guide to Investing in the Fast-Emerging Cannabis Industry

A Guide to Investing in the Fast-Emerging Cannabis Industry