Dogs will eat and throw up grass when they ate something that made them feel bad. They know the grass makes them throw up what they ate that was making their tummies hurt. They will also throw up if they've eaten lettuce.