Technique behind Cycles Baking

Hello,

I have a question regarding the technique behind the baking feature in Cycles.

From what i know about Cycles it is a Backwards Ray Tracer. So rays are send out by the camera and tracked until they hit a light source. So in my render result i don’t really have informations of surfaces which are not visible to the camera.

But when i bake the texture of an object i get color and luminousity informations of the whole surface.

How does cycles do this?
Does its switch to a Forward Ray Tracer approach or does it stick to its Backwards Ray Tracer approach sending the rays out of the surface of the object making it the ‘camera’?