Nötdjur in Swedish is like cattle in English. Normally in practice what you mean when you use the word is just cows, though it could be any kind of bovine. It turns out that nöt here comes from an old word nauta which has to do with 'usefulness', 'ownership' and 'property'. An English cognate is 'neat'. Modern Swedish cognates would be nytta ('use, usefulness') and nyttig 'useful', 'healthy' (like in 'healthy to eat').
nöt as in 'nut' turns out to have a different origin.
I think it's funny too. Another fun fact is that an old insult in Swedish would be to call someone ett nöt, referring to the bovine species. It's still in use, but when we say in plural that people are nötter, that's a loan from the English 'nuts', the other nöt meaning. So whichever meaning of nöt you use, it's still associated with stupidity!