To describe the king as “entangled in the tresses” is to assert that there is a level of G-d that is entangled by our conceptions and projections of Him/Her/It.
The Zohar is teaching that HaShem (so to speak) looked into Him/Her/Itself and articulated a will for a creation that would revel in the glory of G-d. That vision and all the myriad ways it could materialize and all the laws that define its parameters…that is the primordial Torah.