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.
Here is what I would think is a fairly good use of icons: https://learn.microsoft.com/en-us/windows/win32/uxguide/imag... The icons are positioned such that they introduce groups of menu items, and they create a visual structure that one learns to recognize with repeated use.
First thing I found: https://raw.githubusercontent.com/step-/gtk-stock-icons2/ref... See the last row.