Eating junk gives you points. The goal of the game is to score as many points as you can, so you should eat as much junk as possible! 
If the farmer is catching up to you, eating junk will also cause him to drop back.