It doesn’t take a close reading of Katy Perry lyrics to know that plastic bags get little love. You’ve heard: The plastic detritus drifts through the wind, gets stuck in trees, kills whales, and lasts pretty much forever in landfills. So since San Francisco banned plastic bags in 2007, over 100 US cities also enacted bans or fees. Later this year, France plans to implement a ban across the whole country.

But I’ve come to praise plastic bags, not to bury them (or recycle them, the more environmentally responsible thing, FYI). If the bans teach people one thing, let it be this: Plastic shopping bags are remarkable feats of engineering, and consumers have taken them for granted this whole time.

Just look at the numbers: Plastic grocery bags cost pennies to make and hold more than a thousand times their weight. They’re light. They’re waterproof. “They kind of seemed miraculous,” says Susan Freinkel, author of Plastic: A Toxic Love Story, who is clearly no fan of plastic. So miraculous, in fact, that shoppers in the ‘80s didn’t quite believe the feather-light bags could hold up to their heavy cans and boxes.

But in that decade, plastic bags swept through the nation. A new breakthrough design made them so cheap and so easy to produce, grocery stores couldn’t say no. The invention actually came from Sweden, where Gustaf Thulin Sten figured out a way to stamp bags out of tubes of polyethylene, much improved over the way manufacturers had tried to make rectangular plastic bags resembling paper ones. The process is still roughly the same today: Extrude hot polyethylene, blow it up like bubble gum, and pull it out until you’ve got a long tube of polyethylene film. Flatten the tube, and you’ve got two sheets of plastic on top of one another. Then stamp out the individual bags, seal the top and bottom, and cut out a rectangle for the handles. The cut, folded bag resembles a folded shirt, giving it the name “t-shirt bag.”

The plastic itself is a mixture of high-density and low-density polyethylene. This is important: The high-density stuff is strong but brittle, and the low-density stuff is stretchy—extremely stretchy. If a shopping bag were made of low-density polyethylene, “it would stretch to the ground before you got to the car,” says Philip Rozenski, director of sustainability and marketing for Novolex, a maker of packaging products.

After a plastic bag is cut, machines blast it with plasma, or superheated and charged air. This process, called a corona treatment, is why pulling one plastic bag off the grocery store rack slightly opens the next one—a tiny touch that adds a lot of convenience. (Those racks are specially designed to fit t-shirt bags, too.) The corona treatment also changes the surface of the plastic bag, so it holds ink, like for a store’s logo.

At the end of the production line are the tests—a battery to make sure plastic bags are up to snuff. A key test is the “jog test.” Engineers put a weight resembling a giant six-pack into the bag, and a machine shakes it up and down 175 times to simulate the walk—or jog?—from the store to the car.

It’s telling perhaps, that plastic bag manufacturers would focus so much on the walk to the car–this is all most people use plastic bags for. And so the plastic bag’s greatest strength also becomes its downfall. “It’s easy to make the case, why do you have this thing that you use for 10 minutes and it lasts forever,” says Freinkel. San Francisco’s ban came about because the bags were quite literally clogging up the city’s recycling equipment, so that workers had to climb in with box cutters once or twice day.

What’s so galling about just throwing out plastic bags is that the light, strong, waterproof bags are so useful. If you’ve ever needed to carry something in the rain, or schlep a wet swimsuit from the pool, or pick up dog poop—all pain points I’ve encountered living in the island of plastic bag scarcity that is California’s Bay Area—plastic bags are the way to go. Those bags I used get to free at the grocery store? I would happily buy some.

In the grand scheme of environmental problems, ubiquitous plastic bags do not rank that high, says Freinkel, but the bans are still important. “This kind of very short-term mindset and this culture of convenience contributed to huge amounts of environmental degradation,” she says. “The bags have become a potent symbol.” Plastic bags may be symbolic of everything bad in our consumerist culture, but that’s because people just throw away these durable and cheap bags. Reuse plastic bags, recycle them, respect them.