The characterization of the Advanced LIGO detectors in the second and third observing runs has increased the sensitivity of the instruments, allowing for a higher number of detectable gravitational-wave signals, and provided confirmation of all observed gravitational-wave events. In this work, we present the methods used to characterize the LIGO detectors and curate the publicly available datasets, including the LIGO strain data and data quality products. We describe the essential role of these datasets in LIGO-Virgo Collaboration analyses of gravitational-waves from both transient and persistent sources and include details on the provenance of these datasets in order to support analyses of LIGO data by the broader community. Finally, we explain anticipated changes in the role of detector characterization and current efforts to prepare for the high rate of gravitational-wave alerts and events in future observing runs.