How do we perceive object distance in refraction/reflection? Suppose we have some object, from which light rays reflect off and reach our eye. In this example, we can directly see this object, and the image is formed on our retina.
However, consider a coin kept under water. Due to refraction at the surface, we perceive the apparent depth and not the real depth of the coin. The ray of light bends at the surface, and when this new ray is traced backwards in a straight line, it converges at some height above the real depth.
My question is, why do we trace this new ray in a straight line backwards, instead of the original path that it took?  This 'image' in a sense, works as a virtual object, and forms an image on our retina, that the original underwater object would have formed. Hence, we perceive this virtual object and see this, instead of the actual coin that is underwater,
Why is it so, that ray-tracing backwards, only work in straight lines, as if the refractive medium wasn't even there?
The same thing happens in a mirror. It appears to us, that the object is behind the mirror. This is the virtual image  of the original object, and acts as a virtual object for our eyes, that form a real image on the retina.
Again my doubt is, whether this is just an illusion that our brain perceives? That our brains only trace the light backward in a straight line, even if the actual ray bent due to refraction, reflection or something? Our brain would trace the rays to some virtual object, which in the absence of any refraction or reflection, happens to be the real object. In the presence of these phenomena, this virtual object is an image of the real object, which is somewhere else. Is this just an illusion.
Is there some special reason, why our minds can perceive objects by tracing the light in a straight line backwards? For some reason, our brains don't trace the actual path of light, it only traces the light reaching our eyes in a straight line.
 A: After reflection the rays seem to be coming in the direction that they would if there were an object on the left.

image from here
The brain chooses the most likely cause for the rays to be coming in that direction - and that's that there is an object on the left.
Exactly why it does that is a psychological question,  but when humans were evolving  mirrors weren't around, although the refraction in water effect, or reflection from still pools could have been seen.
A: The eyes can only perceive the rays which enter the eye. When viewing objects underwater through the flat face plate of a diving mask, the rays entering the two eyes are refracted at the glass, and the object being viewed appears to closer than it actually is.
A: After going through the wonderful answers and comments, and some more reading, I think I've managed to clarify some of my doubts.
Let us imagine the following scenario.
I'm standing in front of a lake. There is a mountain behind the lake.
The rays of light from the mountain reach my eye, and form an image on the retina. My brain interprets this, by assuming the light travelled directly from the object to my eye ( which it did in this case ), and I perceive the mountain in my vision.
Now suppose, the rays of light bounce off the lake surface and reach my eye. Again, an image is formed on the retina. The brain, assumes that the light travelled directly, in a straight line, from the object to the lens, even though, in reality, the light has reflected, and thus changed its course. My brain perceives an object that is inside the lake. This is nothing but the virtual image, the reflection of the mountain on the lake, that acts as a virtual object for my eye.
The brain always assumes that the light rays came in a straight line directly from the object to our eyes, and this is why we see phenomena such as reflection, bending of pencil underwater and so on. In case of reflection, light from our body bounces off the mirror and reach our eye. Our brain assumes that there is an object behind the mirror, from which this light came. So we perceive some object behind the mirror. What is this object ? Our reflection !

Now consider a camera.  If we take a photo of the mountain lake, we'd see both the mountain, and the reflection in the camera. Note that if the water is perfectly still, and without any side references, we won't be able to tell from the photo, which is the real object and which is the reflection. Remember, the virtual image is acting as a virtual object. Our brains just trick us into beleiving that this is the real object.
Now my question was, why can we see the reflection of the mountain on the lake, in the camera photo. Our brains assume that light travels in a straight direct path, and so we might perceive that there is some object under the lake i.e. the reflection or the virtual image. However, camera is not conscious. So, if the reflection in the lake is visible in the photo, does it mean, that the camera assumes that there is a real object under the water ? Does the camera also treat this virtual image as a real object ?
The answer is an obvious NO !
The camera records the image and nothing more. Our brains record the image on the retina, and analyzes it to give us a sense of vision, a sense of where the object is. A camera does nothing of the sort. It records the image and is done ! There is no perception or analysis involved.
The reflection of the mountain appears in the image, because when it bounced off the surface of the lake, it flipped upside down before reaching the camera. The camera simply records and prints this image. It draws no inference whatsoever, regarding the position of the objects - that's what our brain does !
And since our brain assumes that light travels in a straight path directly from object to the lens of our eyes, the mountain and it's reflection in the lake, appears to be 'two separate' and 'distinguishable' objects to us !
In case of vision, we see or rather perceive the 'objects' that form an image on our retina. In case of a camera photograph, we see the image that formed inside the camera i.e. the image that formed on the retina.
