If you asked a doctor or lawyer how much he earns do you seriously think that you would get an answer . I think not.
Because most lawyers or doctors are not on a unified pay scale, pilots are - except for the few exceptions... *eyes wonder off to CX pay scales*...
And for the most part, pilot pay is "public knowledge" whether we want it or not; see it for yourself, for example
Airline Pilot Central
or
Pilot Jobs Network