This is not quite true. Sheep can eat grass more efficiently because they have wide mouths. Goats have narrow mouths. But both can eat grass just fine.
Sheep will not go out of their way to try new foods but if they are pastured with goats they will observe and learn from the goats, and end up eating a fairly wide variety of plants. They'll never be quite as broad-minded as the goats, but they will eat a wide variety of grasses, shrubs, and leaves. They are not as flexible as the goats and can't reach as high into trees as goats can, nor can they climb hard to reach cliffs and terraces as well as goats can, which is probably why goats are preferred for this but application. But they will definitely eat low-hanging leaves and shrubby plants they can get to.