they had a stalemate so no one side ever won or was able to get to the other side. therefore they had to spend their time in these trenches and most of them died here.
There was no regard for cleanliness, which would have caused disease and infection in wounds. 2 people on 1 bed suggests that there wasn’t enough room for the soldiers, leading to cramped living space and the chance of spreading diseases more likely.