During surgery, the carpal tunnel retractor gently holds back soft tissues and skin edges to create a clear working space for the surgeon, allowing them to see and access the median nerve and surrounding structures without needing to pull aggressively on delicate tissues.