They stand there to cover that 'half' of the pitch if you like - from the penalty spot to touchline. If you watch the referee in these games, he is always on the other side of the pitch, so that the other two officials have there half. If the ball goes to the other side of the box, the ref is there, but he doesn't need to be at the other side because he has his two officials. Around the box, that is the position nearly always taken up - opposite side of the box to the two officials.