Happens to me literally every time. It comes from viewing art. The mind subconsciously analyzes it to take notice and inspiration on technique and composition to improve your skills. It comes from ancient man seeing techniques used to grow food and capture prey that it knew it would need to survive. Those who didn't learn from others died off without having ever mated thus making those who learned to learn from others more successful mates passing on those genetic survival skills.
This has happened to me like 5 times now
I know this feeling.