When you're responsible for the lives of ~200 souls you shouldn't be entitled to so much privacy at your job. The safety of those people comes first. So I don't get why pilots have a say in this in the first place.
They have their say because on that aircraft they are the highest authority. You ain’t flying without them and you cannot train a replacement within a quarter.
That's to do with (inter)national regulations, regulations which can be changed by politicians. Pilots can choose another career if they dislike being monitored at their jobs. There will be other people willing to become pilots.