What a PhD student should do when their supervisor orders them to have a name on their paper just because of grant purposes?
Have you written a grant proposal? My SO at the time was a prof and geochem research scientist. She has generated millions in grants for her collaborators, students and herself to push their research forward. The latest grant I saw her work took many months gathering data and papers, hashing out schedules and compensation for collaborators, students and contractors. She had to prospectively estimate everything from travel costs for the people gathering samples, to costs for reactor and instrument time.

Would her time have been spent better doing science or assisting her students? Absolutely, but grant writing can be difficult as it requires intimate knowledge of the discipline and particular work being done on the project. This is a difficult role to fill that is usually done by researchers themselves, if they want to stay in the "biz".

If she wasn't already one of the lead authors on this research, I would say she undoubtedly deserved to be named on the project. Just because you are writing a paper does not mean the paper is your final product. The paper is a description of your final product, the process of creating the product, and credits those who assisted. 

The person that procured your grant absolutely assisted in your research, consider how your project would have gone without it.