What is attentional bias?
Attentional bias describes our tendency to focus on more emotionally dominant stimuli, while ignoring other relevant data in the process. This often happens automatically and unconsciously (Bar-Haim, Lamy, Pergamin, Bakermans-Kranenburg & van IJzendoorn, 2007).
There are all kinds of factors that can affect our focus, both external (e.g., danger) and internal (e.g., hunger). The factors that affect us emotionally get more attention. Because we can only keep our attention there for a certain amount of time, more focus may go to one at the expense of another. We also can only give our attention to a limited number of things at a time. We may make these things more important than they are, which can create tunnel vision. By thinking about them a lot, they start to become more important in our minds.

How does attentional bias arise?
Evolutionarily, attentional bias can be well explained. Namely, it provides evolutionary advantages when your focus is limited. Focusing on finding food and avoiding danger (such as wild animals) increased our chances of survival in prehistoric times (Tapper, Pothos & Lawrence, 2010).
This is thankfully no longer applicable, as we can just buy our food at the store and we don't have to protect our village ourselves, but the attentional bias is still in our genes.