We need to remember that in this excellent novel that raise so many ethical issues, Ender is being prepared in every sense of the word to champion Earth against the Buggers. As such, the purpose of the mind games he plays, in particular the one with the giant, are supposed to stretch him mentally, forcing him to think laterally and create different ways of solving problems that he would never be able to experiment with without the mind games. We find a very interesting conversation at the beginning of Chapter Seven referring to Ender's "triumph" over the mind game in killing the giant supporting this view:
"Isn't it nice to know that Ender can do the impossible?"
"The player's deaths have always been sickening, I've always thought the Giant's Drink was teh most perverted part of teh whole mind game, but going for the eye like that--this is the one we want to put in command of our fleet?"
"What matters is that he won the game that couldn't be won."
Thus we can see that the mind games are all about testing Ender in a different way, a way that forces him to show his creativity and problem solving skills by looking for extreme solutions, all with the express purpose of Ender trying to achieve and accomplish the impossible. Just as the mind game couldn't be won, so the Buggers supposedly can't be defeated.