It could also be something to do with Samba's
vfs_fruit module. Apple has done some odd things to Windows networking, and the default configs for Samba that I've seen use these extensions for better compatibility. One of the extensions allows you to set custom icons for servers. I suspect that your mac doesn't recognize a Raspberry Pi as a machine type, but sees a server that knows a bit ab out Mac OS quirks, but then can't find a custom icon for it.
As long as it works …
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him