How old are your Aqara hubs? As far as I know, later ones come with firmware that does not allow it to work with HA anymore. I have never been able to get mine to give me the required keys. If there is actually a way to get them to work with HA, could someone please give me a pointer to it?
I've probably had mine 5 years. There is a firmware update that I haven't done (if it isn't broken don't fix it).
I think I am using this integration https://www.home-assistant.io/integrations/xiaomi_aqara/ and can't recall how I got my key - but it would have been following the HA instructions at the time.
That would explain why it worked for you. The old firmware had an option to give you the keys. If you used it, the keys are still valid in later updates, but the option to get the keys is gone.