Of course, it may be public by law in some countries (figures for taxable incomes are public information by law in Finland).
Yes, the governments knows how much most people make. I'm talking about people talking person to person. People, from what I understand, usually don't like it if you just go up to them and say, "So, how much money do you make there?"