The primary function of dystrophin is to connect the cytoskeleton of muscle cells to the surrounding extracellular matrix through the DGC. This connection is crucial for maintaining muscle cell structure and function. Dystrophin also helps in protecting muscle fibers from injury by distributing mechanical forces generated during muscle contraction, thereby preventing damage to the sarcolemma.