Grasshoppers have strong chewing mouthparts which bite from side to side.  By sitting along the leaf edge, the grasshopper is out of the way of its chomping jaws.

 

Source:  Questions & Answers about the Natural World.  ISBN 1-40541-682-3.