Yeah, it seems that at the time imperialism wasn’t vilified for precisely that reason — that people believed they were acting with the native populations’ best interests at heart, or at least in the interest of national security. This, of course, would be the role of propaganda like Kipling’s.
I’m tempted to divide Kipling’s life into “pro-war” and “anti-war” periods as well but I don’t know enough about his life to feel comfortable with this projection. I wonder if he had harbored criticisms of war long before John’s death, and only when his son died did he validated in breaking from his conservative, publicly held opinions. This is purely speculative, but you can see how as a reader in today’s society, this kind of apologist thinking would make it easier to identify with Kipling’s work.
As far as the idea of being pro-imperialism yet anti-war, this seems like the kind of idealist thinking that an imperialist government might wish to impress on its people to minimize the depiction of war. I’d be interested to hear a historian’s perspective here. Namely, I’m curious if war is considered a necessary mechanism of imperialism, and therefore the two cannot actually be thought of as distinct.
Anyway, I’m clearly missing a lot of historical context, but for me these are the kinds of questions that reading Kipling raises.