RAT provides electrical generation too. Its all layers of protection, there are batteries for limited duration and limited equipment. RAT provides more (duration and functionality).
There are some components that are considered like that GPS that have small enough power requirements and are critical enough that they can have significant battery and others that are powered by the RAT, and yet others that just don't work with a main engine failure.
Highly suggest watching some of the Mayday episodes about the power failure incidents like Gimli, its very educational.