All Quiet on the Western Front, by Erich Maria Remarque, chronicles the experiences and thoughts of Paul Baumer, a young German soldier who is the protagonist of this story; it is through his eyes that we see the realities and absurdities of war.
One of those absurdities in depicted in the incident you mention in your question. When Paul is home on leave after being at the front, he is confronted with a major who has obviously never been in a battle. The major insists that Paul salute him; when Paul refuses, the major humiliates Paul by forcing him to march in the middle of the street. As a result, Paul no longer wears his uniform when he is home.
Paul sees the irony in the situation, since "real" soldiers (those who have actually engaged in the awful business of war) are too busy trying to stay alive to worry about the protocols and formalities such as saluting an officer, while the "for-show" soldiers stay at hime and worry about being saluted and marching in formation. Paul says:
We came to realise - first with astonishment, then bitterness, and finally with indifference - that intellect apparently wasn't the most important thing...not ideas, but the system; not freedom, but drill. We had joined up with enthusiasm and with good will; but they did everything to knock that out of us.
This experience with the major is similar to Paul's conversations with older people in town who are certain that all the sacrifices they (civilians) are making are paying off in the form of good food and other supplies for those fighting at the front. (Paul kindly does not disillusion them.) The irony is that the citizens and the soldiers are each sacrificing for the other, but no one is benefiting from these sacrifices but the bureaucrats and government officials.