Ender was deliberately put in a position where he was forced to fight back or get killed. His "handlers" wanted a dehumanized person capable of everything, including genocide.
"The task of the training battalions is to crush and completely destroy the individual, however strong a character he may have possessed, and to fashion out of that person a type to fit the standards of spetsnaz, a type who will be filled with an explosive charge of hatred and spite and a craving for revenge." Source: http://militera.lib.ru/research/suvorov6/index.html
It's a book by Viktor Suvorov "Spetsnaz. The Story Behind the Soviet SAS". A quick and interesting read.
Violence and degradation is a common method of training soldiers. Some (not me) would say the school system is deliberately set in this fashion.