In the EU, "Parmesan" cheese must be legit Parmigiano-Reggiano cheese. [1] I'd presume that Grueyere also has the same protections of origin (despite being Swiss and not actually in the EU).
It's the same for a whole plethora of local products [2] and thus consumers know a) what they're actually buying and b) have the confidence that it's a legit product.
[1] https://www.dw.com/en/eu-court-says-parmesan-cheese-must-com... [2] https://en.wikipedia.org/wiki/List_of_PDO_products_by_countr...