Our short-term memory is wired to deceive us on purpose, scientists have found – a trick that enables us to better recognise what we're seeing in the world around us.

The deception kicks in when we take a second glance at something: our brains partly falsify that second glance, so it matches up with the first. It means we can tell that an object is the same one as before, even if it's moved position or changed somehow.

Think of crossing a road – you look left and see a car and cyclist approaching, then you look right, then you look left and see the car and cyclist again, only in a different position and perhaps in a different light. It may seem simple, but your brain actually needs to employ some mental gymnastics to tell you that's the same car and the same cyclist.

"Initially, it doesn't sound good if our short-term memory reflects something different from what we physically see," says psychologist Christoph Bledowski, from Goethe University in Germany. "But if our short-term memory were unable to do this, we would see a completely new traffic situation when we looked to the left a second time.

"That would be quite confusing, because a different car and a different cyclist would have suddenly appeared out of nowhere."

These are ideas that researchers have explored to some extent before, but Bledowski and his colleagues went a few steps further by adding multiple objects into the mix. They asked a total of 109 participants to track the movement of red and green dots across a monitor, over the course of four separate experiments.

The tests varied the position and speed of the dots, sometimes combining them on the same screen, and sometimes keeping them separate. Analysis showed that what the participants 'saw' the second time around was biased by their first observations – "not very much, but systematically", according to Bledowski.

What our short-term memory is doing is using cues from motion direction, colour and spatial position to introduce deliberate mistakes, the study shows. It seems that the spacing of objects and the order in which they're shown are particularly important.

"The contextual information helps us to differentiate among different objects and consequently to integrate information of the same object through time," says Cora Fischer, from Goethe University.

To go back to the analogy of crossing the road, the tests also showed that our short-term memory is able to process its perceptions of the car and cyclist separately – so based on where they were to begin with, not where they were in relation to each other.

There's plenty more here for scientists to explore, in terms of figuring out how our working memory stores what we've seen very recently and enables us to recognise it again, even if it's altered somehow. For example, previous studies have shown our brains have a similar trick with faces.

The idea that our memory tricks us should come as no surprise though – we're experts at coming up with false memories, forgetting painful experiences and deciding what to remember in the first place. In this case, falsified memories help us navigate the world.

"The slight 'blurring' of our perception by memory ultimately leads us to perceive our environment, whose appearance is constantly changing due to motion and light changes, as stable," says Bledowski.

The research has been published in Nature Communications.