For those who are wondering, yes, Wine is malware compatible so be careful about the EXEs you run!
it’s a smaller target and that hackers aren’t spending as much time trying to attack it
It’s the most popular server system, so I’m not so sure about that.
The target user base is much smaller. Most viruses are spread through user error and server administrators are far more competent than a typical OS user. Also, typical server exploits lead to exposing credentials rather than spreading viruses.
Software is usually installed from repositories and not random websites, so there is less room for user error in general. Even if you download an executable file, you will most likely have to give it permissions to run first. So I think it’s more immune to viruses not because of its users, but because of the way it’s designed.