No "unless". No law should target a specific company or individual by name, ever, whether to give them special exceptions or special permissions or special restrictions or anything else.
(They also shouldn't target specific companies by sufficiently-specific-description-it-only-applies-to-one-or-two-companies, either.)
This is because most laws are created with specific goals and purposes in mind, they're not born finished and ready to be voted on derived from first principles, they usually exist to address something quite specific.
Also, there's nothing fundamentally wrong with citing something as an example in the argumentation around a bill enacting a law (unless it's by way of targeting them with polemic), but there is something fundamentally wrong with putting that in the legal code itself.