This question already has an answer here:
I have a very simple question. If I root my phone, will it be easier for malware to run on my device and cause more damage (due to the nature of the extended set of operations that applications with root access can perform, and the downside of being logged in and running applications as root on Linux systems).
Even when an application is rooted, it can still be configured to disallow installation of APK files from unknown locations (locations other than the Google Play Store). This increases security since it makes it impossible that a web browser download install a malicious app even though the device is rooted.