Why do phones not notify you of malware?
We’re all aware of things like Pegasus infecting phones with info stealing malware, but surely it’s trivial for Apple et al to inspect a device for malware and notify the user? Why do they not do this?
It's not trivial to detect something that's rooted your phone, no.
Some do, like google play protect, you can also literally just install an antivirus if you want one.