Good to know.
what stuff do they coat shredded cheese with? Wouldn’t it have to be labeled?
I would not personally lose sleep over any of that “non-cheese”.
https://www.kcet.org/food/pre-shredded-versus-freshly-grated-cheese-whats-the-difference
In addition to added ingredients, the texture and melting properties are vastly different, IMO. Plus, ounce for ounce, you are paying more for a lesser product. Shredding cheese only takes a few minutes at most. If it is a small amount, I just grate by hand. For larger quantities, I pull the food processor out of the cabinet. Plus, you can often buy better quality in block form than you’ll find shredded. If you have been using pre-shredded for awhile now, try grating your own a few times. I bet you’ll notice a difference.
Of course there is a small difference, but in a pinch, pre-shredded cheese is not going to kill you.
Did anyone claim it would? Of course it won’t or it wouldn’t be allowed. Just pointing out the benefits of grating your own which are many vs saving a few minutes of time. Feel free to keep eating it if you wish to do so it just won’t taste as good. 
I have neither a grater nor a food processor, so that wasn’t an option last night. D2 took my food processor because I hadn’t even taken it out of the box for several years.
Maybe I need to re-think that.
The added starch and other stuff in shredded cheese could throw off your recipe if you’re cooking with it since starch is a thickener. So if you were making a cheese sauce, for example, it might turn out too thick. On the plus side, the starch might actually help keep the cheese from clumping when you melt it for people that skip the bechamel step.
Otherwise if the shredded cheese helps you save time, by all means go for it. For eating straight, I think nothing beats freshly grated cheese. But cooked into something else, it’s probably harder to tell the difference.
I agree with @doschicos that the flavor and melting of freshly grated good cheese beats shredded easily. Even the consistency and taste of the melted cheese is better. That said, I do keep some shredded for convenience or when I need small amounts (to throw in scrambled eggs or something).
My suggestion to make extremely quick work of a small amount of cheese shredding is to get a microplane. A good quality one only costs $10-15 and takes up little room in a drawer. I just use it right over my pan of scrambled eggs. Also, very handy to use for grating ginger, citrus peel, parmesan cheese for pasta, garlic, etc. Perfect for small jobs but not designed for large shredded cheese quantities like one would need for potatoes au gratin.
Yes I have one and use one - but sometimes it’s dirty or I literally want to save the two minutes of unwrapping the cheese, cutting a piece of, finding the microplane, and doing the job! I use it lots for lemon zest too!
Varies from home to home, but sometimes there is a time and place - for shredded cheese.
I would like to prepare this dish for a group, but there is dairy allergy. In the past I’ve replaced milk with coconut in other recipes. Would coconut milk work with this recipe?
On a side note, for nondairy whip cream, I use full fat coconut milk from Trader Joe’s, remove the cream on top and whip it up.
IMO, if you want to accommodate both dairy eaters and folks who can’t have dairy, you will be much better off making another dish than the one that uses cheese. I can’t imagine a good gratin without real gruyere. 
For a non dairy option or for vegans, I’d do something like this recipe. I haven’t made this recipe but have had something similar and I’m sure you could find other recipes that are a variation on this.
https://www.finecooking.com/recipe/potato-thyme-olive-oil-gratin
Basically, it is the same thinly sliced potatoes but with herbs (you could switch it up - I’m sure rosemary and sage would work well). I wouldn’t try to sub in other non-dairy products for potatoes au gratin. If you are feeling energetic, perhaps you can make both because the classic sure is yummy.
The recipe @doschicos linked sounds really good. I’ve also made vegan mashed potatoes with almond milk and truffle oil, and if you wanted to make it a little fancier you could finish it off in the oven with some seasoned breadcrumbs on top or something like a layer of sliced sun-dried tomatoes.
As good as this dish was with the white and medium cheddar, I can only imagine how much better it would have been with gruyere.
I have been very sick in the last ten days since I got back from Prague (nearly canceled the dinner because of it). As a result, I have completely gotten off my very low carb diet in the interest of misery loves comfort food. I’m going to have to get back on the wagon, but this dish (with gruyere) WILL make an appearance at one of my holiday meals next fall/winter. It’s definitely a keeper.
Funny note, I grew up eating this dish from a box. Oh, the Humanity!