Sheep is Minecraft's renewable wool supply, and the mechanic that makes it renewable is grazing. Shearing takes the wool without hurting the animal, but it only grows back after the Sheep eats a grass block — which is what the sheep food question really comes down to: grass regrows wool, wheat is for breeding and for leading a flock where you want it.
That single rule is what a sheep farm is built around. A pen floored with grass keeps producing indefinitely; a pen floored with stone or planks gives you one shearing and nothing afterwards. An automatic sheep farm is the same idea with an observer watching for regrown wool and a dispenser full of shears doing the cutting, and it still needs live grass underneath to work at all.
Dye used directly on a Sheep recolors the animal, so every shearing from then on comes out in the new color — dyeing the sheep once is far cheaper than dyeing wool by the stack forever. Naturally spawned flocks are overwhelmingly white, with light gray, gray, black and brown turning up occasionally and pink at roughly 0.164%, which is why a pink sheep is the one people screenshot rather than shear.
Breeding takes wheat: feed two adults and the lamb inherits a parent's color, or a blend of both when the two colors combine the way their dyes would, so a blue and a yellow parent can produce a green lamb. Sheep cannot be tamed, which leaves a lead and a fence as the only ways to hold a flock together. And a Sheep named jeb_ shifts through all sixteen wool colors while it lives, though the rainbow is display only — shear it and you get wool in its real color.