Only items you can activate from Finder > Preferences > Sidebar have custom sidebar icons. If you manually add folders, such as the Developer folder, to your sidebar favorites, they will show up with a generic sidebar icon, even if the folder has a custom Finder icon.
The only way to change this would be with hacks as described by e.g. Keyboard_Gamer's answer.
For more clarity, a 3rd-party app can add a finder extension to get a custom icon. This is why dropbox, google drive, onedrive and other folders might have custom icons.