I've seen the phrase "flight hours as compensation" before, and would like some clarification on it. What I've read seems to generally concern operating an aircraft on a PPL for a commercial purpose, basically meaning if you fly an aircraft and don't cover "your share" of the aircraft expenses, then recording your flight time may be considered compensation by the FAA. What I'm wondering is, does it stop being considered compensation after you get a commercial license? If I have a CPL and fly for hire, paying no expenses of the flight, are my flight hours considered compensation in addition to my wage? Do I have a legal right to those hours? Is a company allowed to, as a condition of employment, require that I don't log hours while flying their aircraft? If a company suddenly and without reason sticks me behind a desk instead of having me piloting an aircraft, would the loss of flight hours be considered a pay cut?
There are a few different questions in here, some are FAA regulated and some are a matter of the terms of your employment
If I have a CPL and fly for hire, paying no expenses of the flight, are my flight hours considered compensation in addition to my wage?
Maybe, its somewhat up to your employer, but more importantly its not really what the FAA cares about. You have a CPL and are presumably flying for a legal carrier/operation. In the eyes of the FAA they don't much care how you are paid beyond that. Practically the legislation is more to ensure that people who are getting paid are properly licensed and working for a proper operator.
Do I have a legal right to those hours?
As Juan notes if you were PIC (or SIC) properly certified in the aircraft then the time is yours.
Is a company allowed to, as a condition of employment, require that I don't log hours while flying their aircraft?
That seems like it would be encouraging you to not follow a FAR which is not a great idea.
If a company suddenly and without reason sticks me behind a desk instead of having me piloting an aircraft, would the loss of flight hours be considered a pay cut?
This depends two things, your existing contract with your employer, and if that contract changes when your job changes. Often times with a role change your contract, or the terms of the original undersigned contract can be changed. If you were a pilot with a Minimum Monthly Guarantee in your contract you may be entitled to keeping your pay-rate. However if the new job comes with a contract change or shifts where you are under your current contract you may not be entitled to anything.
If you are a PPL and don't cover your share of the flight it is illegal because you don't have a CPL, regardless of whether you logged the time or not. Unless you have a reason to go to the destination where the other people in the aircraft are going, it's not going pass muster. The regulations do not state that the hours amount to compensation either. From FAR 61.113:
(c) A private pilot may not pay less than the pro rata share of the operating expenses of a flight with passengers, provided the expenses involve only fuel, oil, airport expenditures, or rental fees.
Notice that the reg doesn't say that you can charge for your time as expenses or be reimbursed for it, pro-rata or otherwise.
To the other part of the question, no, a company cannot prohibit you from logging your hours. That would be a violation of FAR 61.51. But if you're transferred to a desk job, that's an issue related to your employment contract, and I doubt any court in the US would hear a case saying you have a right to be compensated merely for the flight hours you would fly if you kept your flying job. You might get the difference in compensation if the flying paid more than sitting at a desk, but not for the flight hours per se.
Also, being transferred from one position to another ALWAYS happens for a reason. Just because you don't know what it is, or don't agree with the reason, doesn't mean there isn't one.