The primary function of wavy collagen bundles is to provide tensile strength and flexibility to connective tissues. This allows tissues to withstand stretching and compressive forces. In tendons and ligaments, the wavy pattern allows for a certain degree of stretching before the collagen fibers become taut, thereby preventing tissue damage.