Idk I just know it happens on LineageOS. So far it’s only been google speech recognition, it gains mic permission even though I have it disabled in the settings. I know because a root app called bouncer (auto revokes permissions), will ask if I want to revoke the mic permission in speech recognition randomly, despite having the permission denied in settings.
Many apps have a permission called “access restricted settings” and many can read device state, meaning they can read your device ID