Can't I say 'The cow eats the grass'? When the article 'the' is added to cow, why not to the grass?
Exactly, same way as it was in earlier lessons with "The boy eats the banana" and Duolingo would not accept it without both "the".
Grass is one of the English words that can be used both as a collective noun (without a definite article) and as a specific noun (with a definite article). Your answer, therefore, has to be marked correct unless you made a different mistake.