When I was first starting to cook for myself, pre-shredded cheese was a fixture in my refrigerator. I usually had a few kinds on hand: a bag of "Mexican" blend for quesadillas, another bag of mozzarella for pizzas, and a plastic tub of those hard little sticks of Parmesan for pasta dishes. I'm not sure I owned a cheese grater, but even if I did, I know I lacked the patience to use it. The availability of pre-shredded cheese in such a vast and international array of varieties seemed like a miracle to me.
As I continued experimenting in the kitchen, however, I started to notice that the pre-shredded cheese didn't always perform like it was supposed to. The weirdly al dente Parmesan sticks never totally dissolved into pasta sauces; the mozzarella never melted completely into the gooey cheese layer one associates with pizza. In fact, upon closer reading I discovered that most recipes are very specific about requiring "freshly grated" cheese.
Label Deep Dive
As a test case for this article, I compared a block of cheddar cheese with a bag of pre-shredded cheddar from the same company. The shredded cheese contained -- in addition to the ingredients also listed on the block of cheese -- potato starch, powdered cellulose, and natamycin.
Potato starch is pretty much what it sounds like. It's sold commercially for use as a thickener, and has desiccating and anti-clumping properties that help keep cheese shreds separate. Cellulose pops up in the ingredient lists of a lot of pre-packaged foods. The tasteless, ultra-fine powder is derived from wood pulp (really), and can be used to add dietary fiber, as a thickener, as a stabilizer, to improve mouthfeel or to prevent caking. In the case of shredded cheese, the two are often used in combination with one another because while cellulose is more effective, it also creates a visually unappealing coating. Potato starch is translucent, so cutting the cellulose with it allows manufacturers to use more without losing the color and look of their cheese.
Natamycin is an anti-mold agent that is typically suspended in solution to a concentration of five to 10 parts per million, then sprayed on cheese shreds to coat them as thoroughly as possible. It's tasteless, non-toxic, and naturally occurring, and has been used in commercial food production for a long time. It's also non-water-soluble, so it can't enter the human digestive tract. That means it doesn't count as an antibiotic, although it is sometimes prescribed by doctors to treat eye infections.
These ingredients are (mostly) to blame for why pre-shredded cheese performs differently in recipes than freshly grated. Hard cheeses like Parmesan are dry to begin with, so it's no surprise that pre-shredding them and then tossing the shreds in industrial desiccants creates those rigid little sticks. But even soft cheese shreds that have been treated with anti-clumping agents will resist melting together while cooked, the same way they resist melting together in the bag.
There are two other areas where freshly grated cheese outperforms its bagged peers: cost and shelf life. When you grate your own cheese from a sixteen-ounce block, you get around twice as many shreds by volume as you would from a sixteen-ounce bag. (If you're not keen on using a box grater for reasons of injury or laziness, you can also cheat using a special attachment for your food processor.)
To return briefly to the subject of natamycin, the reason anti-mold agents are needed for shredded cheese but not block cheese is that shredded cheese has a lot more total surface area for mold to colonize. Manufacturers recommend using or freezing shredded cheese within a few days of opening the package, while block cheese can keep for weeks. (Pro tip: removing it from the plastic wrapper and storing it in aluminum foil instead makes it last even longer.)
Finally, I have no way of proving it, but it's my personal opinion as a cheese lover and human that freshly grated tastes better. Maybe it's purer in flavor because it lacks added ingredients, but the desiccants used in pre-shredded cheese are said to be tasteless, and amount to less than 2% of what's in the bag anyway. So maybe it's just that anything tastes better when you've labored over it yourself.