Logic behind "あった" meaning "found it"


For example, when someone is looking for something and sees it, they will say
"あった”. I understand that the literal translation of あった is just the past tense
of ある and means something like "existed". My question is how does this meaning
become "found it" i.e. what's the logic behind saying "something existed" when
looking for something and then finding it.

