Hi Hazem,
A lost cause means something that is pointless, or something that you can’t gain anything from. So ”suffering for a lost cause” is like saying “suffering without gaining anything”, or “suffering for no good reason”.
In this example, the writer is saying that the soldiers were fighting a pointless war.
I hope that helps!