It's mainly for the GK on/off the line, than to see if the ball is in or not
http://www.fifa.com/mm/document/afdeveloping/refereeing/law_6_the_assistant_referees_en_47406.pdf
Point 3 on page 4 and then pages 13 & 14
It hardly ever get enforced though, like you say. Dunno why