Critics who call this book "controversial" overlook two fundamental facts: it was written for young readers, teenagers; it is not about the military action or even about the society where it is set. It is about morals, justice and ethics.
Heinlein anticipated the debate over individual responsibility and free-will. How would criminal law work without the concept of retribution, replacing it with the painful, individual decision between rehabilitation and death?
Decades before the concept of "selectorate," as described by Bruce B. de Mesquita et al. in "The Dictator's Handbook", Heinlein proposes a practical way of determining voting rights in exchange for practical civic duty.
The ethics of corporal punishment, especially for children, are discussed not in terms of cruelty and revenge, but in terms of careful, surgically applied learning vocabulary. Teaching is firm and impersonal, good parenting is everything.
Starship Troopers does not sell an ultra-conservative world view. Instead, it dismisses collectivist alternatives as unsuitable for free human expression and development.
Misguided readers, such as the screen-writers and director of the first film adaptation, do not see this or are not brave enough to propose it to a politically correct audience.
It takes some courage to read and understand. This applies to each and every one of the many books written by Robert Anson Heinlein.