Is there any explanation on why only humans and animals do not remember previous life? I have heard from a Buddhist monk that hungry ghosts usually return to their familis searching for food, which makes me believe they have easy access to memories of their previous life. Some hell beings also know what they did to deserve their punishment (according to what I have heard) so they have access to memories as well, I'm assuming devas should know it too.

Apparently only Humans and animals do not remember previous lifes, is there a reason for that in the teachings?
All the beings you mention as remembering past lives are spontaneously reborn (opapaatika), whereas humans and animals are either egg-born (aṇḍaja), womb-born (jalābuja), or moisture-born (saṃsedaja). Only spontaneously reborn beings are readily able to remember their past lives; most others have their past life memories repressed by the trauma and general coarseness of their rebirth.

I know this is all general Buddhist knowledge, but I can't find a reliable source from the original texts; if anyone knows of one, please feel free to put it in the comments.