How ZigBee children select their parent?

I have tried to run the simulation on OPNET to study how tree topology in ZigBee form the network
The parameter and node positions are shown in the below link

https://goo.gl/photos/5Tj16MVtkabLAB1z5

The logical connection is shown below link

https://goo.gl/photos/rJnoBoZPXpKLH8s29

The question is, from what I have understood, the tree depth separate and perform by the distant. In this case node 10 is closer to node 3 than node 1, why did node 10 select node 1 as parent instead of node 3? Could you guys please help me sharing how ZigBee children node select their parent ?

It is really simple, the child sends out an Association beacon request to all parent nodes within range. The first parent to respond to this request which is allowing joining is who it associates with.