"I am not a happy man, Ender. Humanity does not ask us to be happy. It merely asks us to be brilliant on its behalf. Survival first, then happiness as we can manage it. So, Ender, I hope you do not bore me during your training with complaints that you are not having fun. Take what pleasure you can in the interstices of your work, but your work is first, learning is first, winning is everything because without it there is nothing."
This quote is said by Mazer Rackham to Ender in the final third of the book. It's a great quote because it does a bunch of things really well. First, the quote is right in line with what Graff has been saying the entire time. People are tools that need to be used in the appropriate setting. It sounds really harsh when said like that, but Graff and Rackham are both clearly in the same philosophical train of thought when it comes to life's purpose. People have jobs, and people need to do those jobs. Mankind's chief end is to be useful, not to obtain happiness. With that said, Rackham's quote sits better with Ender because it leaves open the possibility of happiness. Graff's quote does not.
"Maybe humanity needs you. To do something. Maybe humanity needs me—to find out what you're good for. We might both do despicable things, Ender, but if humankind survives, then we were good tools."
Rackham's quote seems to suggest that happiness can be found in doing work well. Additionally, Rackham's quote suggests that happiness is an acceptable goal in and of itself provided the usefulness and survival goals have been accomplished. Rackham's philosophy here is right in line with Maslow's hierarchy of needs. Maslow said that in order to obtain "self-actualization," a person must accomplish and obtain the other needs that exist below it in the pyramid. The first level is basic physiological needs. Food, water, and shelter must be obtained before a person can move on to being psychologically secure with happiness and relationships. This is what Rackham is saying to Ender. Survive first, happiness next.