A great deal of what Remarque was writing about was the battle of the men on the front, particularly Paul's battle amidst the destruction, the horror and the inhumanity of the war. In this regard, moments like this serve to describe the way that humanity is lost to the great machinery and horror of war.
In the midst of the massive attack, the individual no longer is concerned with morality, with whose side they are on, with anything other than staying alive. And since staying alive requires killing anything that approaches them, anyone that approaches them becomes something to be destroyed and hated and feared. It wouldn't matter if their best friend or their brother appeared in the midst of this maelstrom, they would do their best to destroy them with whatever means they had at their disposal.