Penetration testing is required to meet auditors' requirements by most security certifications like ISO 27001 or attestations like SOC2 and to comply with cybersecurity and privacy-related laws of the land like HIPAA or industry-specific regulations like PCI.