What is the purpose of visual experience?

What is the purpose of visual experience?
~~~
Visual experience refers to the reality that perceives it. Like your night dreams refer to the reality of the dreamer.
Upon waking up you realize that the pink flying elephant in your dream was not real and only you (the dreamer) is real.
Appearances come and go and refer to consciousness that does not come and go.
The moonlight refers to the sunlight.