In chapter one of All Quiet on the Western Front the writer, Erich Maria Remarque, describes the camaraderie of war in a unique way.
“. . . we have learned better than to be shy about such trifling immodesties. In time things far worse than that came easy to us."
Here, he is actually talking about the way the men relieve themselves. They do not have private bathrooms that they use, or the typical military field latrine. They simply sit about in a circle, on their individual boxes, and empty their bowels while they have a conversation with each other. Yes, it sounds pretty weird. The author’s point is that the experience of war has changed them to such an extent that the things they used to find embarrassing don’t bother them anymore.
Your second excerpt from chapter one is concerned with the idea that they could die at any time.
"It might easily have happened that we should not be sitting here on our boxes to-day; it came damn near that. And so everything is new and brave, red poppies and good food, cigarettes and summer breeze."
The writer is putting forth the idea that this daily uncertainty makes things better in a certain way—they have learned to appreciate things like “red poppies and good food” on a new level.