What should PhD students do when they are told to add authors who did not contribute to the paper (e.g., head of school, international funders)? There's a department at my university where the head of department is routinely put as author on papers he didn't contribute to, and where researchers from overseas who had no input (but who provide funding to the department) are put on papers.  

As a pragmatic matter, how should a PhD student respond when they are told to put three names on a paper, when those people didn't contribute?  Assume that refusing to put the co-authors on is not an option, because:


There will be bad consequences if they do not, and 
This practice is routinely done at a high level, and there is nobody at the university to complain to about it.


This is not a duplicate of this question, because its answer assumes that it is practical for the student to refuse.
The other answers are good already, especially the point that "If you can't change it, do it and move on." 
I wanted to add that it should be OK to ask a question. You may politely ask a question like

"I wanted to make sure that person A and B shall be added as authors to the paper P. As far as I remember, both people did not contribute to the research or the writing of said paper. However, there may be reasons to add A and B that I do not know and I would be glad to learn them."

It is not impossible that there are fields in which giving funding or providing facilities are accepted reasons to be a coauthor. This may sound strange, but at least if this is agreed upon in the community and the contribution of the different authors can somehow be  estimated (e.g. by the order of authors, but I have also seen footnotes explaining different contributions such as "designed research", "performed research") this would be OK.