Default Why is rooting more dangerous- malware wise?

So I was always under the impression that rooting is more dangerous because it lets applications more access to the system and let it perform more actions. However, now that I think about it can't this be handeled by a program that limits permissions?
Or do apps in a rooted phone behave differently than in an unrooted one (ie.can do actions not included in the permission system)?

What about an unrooted phone?
If I install a spyware what information can't it gather that it can on a rooted?

Thank you very much!