The definition of a bystander is a person who stands near but doesn't take part in an event.
Someone who happens to walk into a store while it's being robbed is an example of a bystander.
a person who stands near but does not participate; mere onlooker
A person who is present at an event without participating in it.
by- + stander