Well it was not an issue back then since any app was able to query certain arbitrary specific apps (and yes some apps used to query a big list).
They disabled the "fun" function in android 11 with the arrive of the QUERY_ALL_PACKAGES permission.