I thought that's what the APU in the tailcone was for.
Until you run out of fuel.
I don't know, perhaps the APU does that inflight for civilian aircraft where room is not as much as an issue as a military aircraft, which generally does not have the space to carry an APU.
The RAT is used in case of engine failure or generator failure on a single engine plane (or maybe even double engine) and is deployed into the airstream as a small turbine that can generate electrical power (and in some special units, hydraulic power as well, I think)
We had a plane that had to deploy it once on a night carrier landing because when he hit the deck, the force of the impact popped off the canon plug on the generator, which had not been safetywired in place...:( On a single engine plane, that makes it tough..thank goodness for the RAT.