I'm of the opinion that there was a time, very early and ever-so-briefly, when icons were useful in distinguishing on thing from another. But now we have so many of them, all demanding our attention, and looking quite similar to one another. App icons on macOS maybe not so much, but for sure toolbar icons. IIRC, there are even usability studies out there that back me up on this, though I'm too lazy and apathetic on the topic to go look them up.
Point being, useless as icons might be these days, "we've always done it this way" and either no one dare go against the grain or no one has a better idea.