And prior to Apple Airport firmware 7.9.1 (2019), even if you did a factory reset of the device, your configuration was still kept on it but just made inactive.
You could factory reset one, enable SSH, then login and see the previous configuration which would include the WiFi network key, any RADIUS authentication credentials, and an Apple ID "infinite authentication token" if "Back to my Mac" was enabled (though I never found out what token allowed access to).