Except it didn't know it was being observed. Photons are not conscious.
The talk of "observation" in quantum mechanics is frequently misinterpreted into a form of new agey woo. And this is popularized in various pseudo-science and quack spiritual hubbidy-bumble, especially on the internet where facts are treated as though they don't matter.
Observation, in the context of quantum mechanics, does not mean being watched, but with being measured. I'm not going to pretend to be a physicist, but I'll share what little I understand: Because of the Uncertainty Principle it is not possible to know a particle's location and momentum at the same time. Particles exist in a state of superposition (see
Schrodinger's Cat) until there is a wave function collapse, i.e. in the case of Schrodinger's Cat the box is opened and we can see whether the cat is alive or dead. The act of measurement--an interaction with the system--creates a wave function collapse. Thus the act of measuring is an interaction and the result is a wave function collapse.
It does not mean photons are aware or conscious, it does not mean we live in a simulation--it means that particles are weird, that at the smallest levels of the universe things behave very strange in comparison to the macro-level of the universe. The Holy Grail of physics for the last century and a half has been how to unify standard physics with quantum physics. Nobody's been able to do that yet.
There's no woo involved. The double slit experiment is weird, like a stage magician pulling a rabbit out of his hat it causes us to second-guess reality--but just like the magician pulling a rabbit out of his hat is not doing any magic but there is a perfectly rational explanation, the same is true of the double slit experiment. And that is why the study of quantum mechanics exists, to dig into that weird math and observations of the sub-atomic level of the universe.
Any attempt to spiritualize quantum mechanics is bad. That's bad science and it's bad spirituality. It's fundamentally no different than claiming crystals can cure cancer or that wearing tinfoil hats can make aliens stop listening into our thoughts.
-CryptoLutheran