ための usage in this sentence


> 貴方は生物だから、鉱物の死を理解できないのよ。だから鉱物の死を『視る』ためには、まず彼らと同じ指向性を持つ **ための** 回線に繋がらないといけない。

I really can't understand this

I know that

> AのためのB → B for the sake/benfit of A

But it does not make sense here, at least to me.




ため also has the definition of "purpose, objective, aim."  

> まず彼らと同じ指向性を持つための回線に繋がらないといけない。  
>  First you must be connected with the circuit that has the purpose of taking
> the same alignment as them.




ため also has the definition of "purpose, objective, aim."  

> まず彼らと同じ指向性を持つための回線に繋がらないといけない。  
>  First you must be connected with the circuit that has the purpose of taking
> the same alignment as them.

