The point is, if every item in a long menu has an icon, then they typically can’t all be very distinguishable and recognizable, and blur together visually. It creates more visual noise, and less structure, than if only some items had an icon.
As for finding groups quickly, for example it doesn’t make sense give all of “Save”, “Save as…”, “Save all” an icon, but giving the first one an icon helps to recognize the “Save” group of operations.