Imagine outskirts of a remote village with a sole bakery. Everyday at sharp 6PM in the evening, there is an automatic switch that powers on a huge neon bulb that calls out the bakery name in bright colors. The turning on of this neon light is accompanied by a typical static electric sound that comes when big old tube lights are trying to power on. The automatic switch that powers on this light, at the same time also opens up the exhaust shafts of the bakery kitchen that send out a familiar aroma of baked breads and biscuits to the surrounding area. The aroma that had probably died out over the day due to wind and dissolution. the warm air let out of the exhaust shafts lets out a ripple of compressed wind that can be minutely felt if one were to pay attention.
This is an event that can alert the human senses - all five of them simultaneously. If one were to stand about a few feet away from this place, at exactly 6PM, his eyes will record the light, ears will hear the sound from the light, nose will sense the smell along with a pseudo taste of the bread on to the tongue along with the skin feeling the warmth of the sudden gush of air.
If we were to consider the physical laws of nature minutely, light that travels fast would be the first to reach the person and it is the eyes that get the hint of the event primarily. Then comes the second fastest signal of sound and ears get activated and acknowledge the event. Then comes the wind to nudge the skin sensation and then come the smell and taste perceptions. Because of these laws of physics sending different signals at different speeds, human beings also evolved to prioritize the senses in the same order - eyes, ears, skin, nose and tongue. Eyes became the highest priority input of signals to the brain.
For the brain to process the event, hence, it relies primarily on that it gets from the eyes. If there is a signal coming from the eye, the rest of the signals of the event only get associated to have been tied to this primary signal and is processed accordingly. If there is any event where we don't see anything and sound becomes the primary signal, the other senses of skin, nose and tongue become the accessory events if present and the brain still looks for a visual confirmation. Example if you hear an unexpected sound while asleep and you wake up suddenly from it, your brain looks out for a signal from the eyes for making the connection and doesn't try to grab the signals from skin or nose or tongue. Similarly, if you suddenly smell an aroma, your brain again looks for the source of the smell and reinforcement from the eyes. Eyes have become the primary sense organ, followed by ears, skin, nose and tongue, most probably in that very order.
Not all events instigate all the five senses. Sometimes it is just a powering on of a normal bulb, activating eyes and no other sense organ. Sometimes it is eyes and ears and no other senses. Occasionally more than these two senses and rarely all the five. However, the brain in itself cannot guess if an event will have only one sense activated or multiple.
Because of this inherent need to ensure one event with all its associated sensory signals, there is a very short duration of time before which the brain doesn't actually start connecting the signals, but only receive them into the short term memory. The time slot is however very very small and hence humankind took ages to connect thunder and lightning to have the same event as the source.
First the signals get into the short term memory region of the brain where they are recognized as coming from a particular sense, stored and prioritized, waited a minuscule amount of time for reinforcement from other senses and then processed and recorded in the long term memory. This way of processing the external signals have been the way we are since eons. Right from the days of early homo sapiens this is how the brain has evolved to process events from the world.
While this order of stimulation of senses, short term memory, long term memory is the way how we interact with the world around us, human being do develop minor glitches in the process. Just like our eyes gaze at blank region for a second while seeing nothing, just like we suddenly start acknowledging the sound of a particular insect that has always been chirping but we unwittingly ignored the sound, etc. Likewise unwittingly we sometimes can delay the short term memory data movement to long term memory commit. The short term memory region is only an event collection region and the order doesn't matter. in other words, the perception of the order of events or linear time as we call it, begins only in the long term memory region. Hence, we can successfully acknowledge that the light, sound, smell and warmth from the bakery in our earlier example are in fact originating from the same place.
Once the stimulus of events is read from the short term memory, it is processed and signal is sent back to discard it to make room for newer signals. Very rarely, the processing doesn't happen in the long term region. The data is read from the short term memory, but just like the eyes that gaze at something but fail to register the visual data, the processing part of the brain sometimes holds unprocessed data and doesn't know what it is for. The short term memory is not cleared yet because the main processing region did not acknowledge the data reception. In the micro seconds of time, the signals from the short term memory is read again, this time ready to process it. However, it already has the exact same data unprocessed from before which is not tied to any time.
This gives rise to a scenario where brain has to make sense of the extra copy of data that is not time bound. It sees exactly as something already seen but doesn't know when. It doesn't feel like the same signal that originated from the event that it is now processing because this new data is fresh and it can continue to associate with events that continue to happen. It is the older copy of the signals that it failed to process earlier and that which doesn't correspond to the current timing of the events but looks exactly the same that it has to make sense of and it cannot. This is called Déjà vu.