Despite the notion that dogs are strictly meat eaters (carnivores). All animals require a balance of vegetable matter in their diet. Therefore, dogs eat grass.
Dog's nutritional requirement
Just like any other animal dogs too require vitamins (nutrients that they cannot produce themselves) as well as fiber.
This fiber comes from plants and grasses. There are several Omega fatty acids which are also elusive in today's modern landscape, yet essential in all animals’ diets.
Like most mammals, dogs also benefit from pro-biotic nutrients: bacteria that assist the gut in digestion. Those bacteria lead a long, happy life inside the gut, assisting absorption of nutrients without ever causing illness. They also protect the gut from invaders….. they are a valid part of the immune system.
Mostly, our manufactured dog foods have not provided all of these elements until recently, as consumers have become more educated. Now we can spend about $2 per lb (here in the US, where we're not metric) and get a zero-grain dog food, complete with pro-biotics, beets, greens, and spirulina at Costco.
This is why dogs eat grass to get those probiotics and vitamins. Sometimes when they eat loads of grass and cannot digest it they vomit the whole of it.
How to stop dogs eating grass
There is a product called green tripe that is a bit of a miracle for dogs with digestive problems. Green tripe is the product of digestion in the first stomach (rumen) of grass-fed animals (usually cattle and goats). Get it from a local butcher and serve to dogs several times a month as part of a raw food diet. It smells horrible - like a combination of death, manure, and bad breath.
If you don't have a local butcher to get it raw you can find green tripe canned online in a product called Trippe.
Finally, a word of caution. please don't get jumbled up this matter with dogs eating other animals poop or soil. That condition is called "Pica". Pica can be due to various reason such as irritable bowel syndrome, pancreatic enzyme deficiency, vitamin deficiency and much more reason. better to visit the nearest vet.
Healthy Dog Diet
I encourage dog owners to explore the possibility of supplementing their dog’s daily diet with a few veggies: cooked carrots, broccoli, potatoes… mashed up and mixed with their commercial diet. A little chicken broth makes it all very palatable. I promise your dog will stop eating grass, and there will be no consequent vomiting.