You are right. It doesn't seem to make sense anymore to invest time in fixing stuff on public.
In the code you posted, there is even the doc block:
/**
* @param int $idProduct
*
* @return array
* @throws PrestaShopDatabaseException
* @throws PrestaShopException
* @todo Remove existing module condition
*/
The Todo was added in late 2022. So the problem is actually known, but there was never time to fix it cleanly.