Dogs do not have the means to digest grass, as they lack the enzymes needed to break down the fibres.
Thus, there is little nutritional value in it for them.
One reason for eating grass may be due to a feeling of nausea.
It is possible that dogs learn this is a temporary solution for stomach irritation.