What if you don’t know that your actions are illegal? Who could reasonably do a job as an employee if they didn’t have that liability shield?
This isn't an excuse for private citizens, so why should it be an excuse as an employee?
That said, we should propagate responsibility as high as possible. If you are a rank-and-file employee and your manager is asking you to do something illegal, unless you have enough professional autonomy to decline the request without being fired then your manager is responsible, not you.
Private citizens are employees. Employees have agreed to exchange their labor to another party that intends to profit from it. Why should the labor face the liability when ultimately it is the company that interfaces with the public and profits from their efforts?
This isn't an excuse for private citizens, so why should it be an excuse as an employee?
That said, we should propagate responsibility as high as possible. If you are a rank-and-file employee and your manager is asking you to do something illegal, unless you have enough professional autonomy to decline the request without being fired then your manager is responsible, not you.