There is so much confusion about how .desktop file works on this thread.
First, the application should ship at least one .desktop file and one icon file (SVG or PNG). There are exceptions to this, but lets not get into it now.
Second, in the .desktop file, it must specified which icon should this app uses. For example, Kate specified icon=kate in its .desktop file. So, it will use icon named "kate" that can be found on /usr/share/icons or ~/.local/share/icons.
Third, by default it will use the icon theme you set on your desktop. If the icon theme you set doesn't provide "kate" icon, then it will use its own icon which is usually installed on /usr/share/icons/hicolor. Kate does ship its own icon.
I suspect there is something else that caused @elfprince problem.