NaCl role in CTAB - DNA complex in DNA extraction
CTAB forms insoluble complexes with nucleic acids and can be used to selectively precipitate them from solutions, see this reference: 


The isolation of bacterial nucleic acids using cetyltrimethylammonium
bromide (Cetavlon)


When you add NaCl in a concentration between 0.4 - 0.7M, the nucleic acids stay in solution, while polysaccharides and other substances, which may interfere with the DNA preparation do not. See this paper: "Rapid isolation of high molecular weight plant DNA."