What makes a girl go to talk to you out of nowhere?

Is it because of just attention, attraction or just wanting to have a new friend?

Why would they sometimes take some weeks to approach you?

Is it something of shyness or more about shy people approaching?

Context:

There has been many girls that had approached me out of nowhere and basically kind of tried to get some conversations going (maybe to make a type of friendship).

It usually happens after they see me for a few days/weeks. I have no idea if by them approaching is actually the way of gathering enough courage to talk to me.

It's kind of new to me.

What makes a girl go to talk to you out of nowhere?
Post Opinion