The 'how' of kids being forgotten and left in hot cars is pretty well studied.
Its much more likely to happen with someone who is not the childs usual carer, not the person normally transporting the child somewhere, where there is a change of normal routine - so yes, the fact they are in charge of this child has completely left their mind briefly.
So a father who doesn't normally drop the kid off at daycare before heading to work, a grandma who doesn't normally have the kid, has taken them out to the supermarket...
It's way more common in situations where the kid is liable to fall asleep - so the early morning, after a day of trailing around after an adult doing their regular chores/errands -and of course, kid is in the back, invisible if the driver doesn't fully turn around and look.
It's pretty rare that this happens because a child has intentionally been left in the car 'whilst I just do xyz' - (the way many dogs die in hot cars).
The fact that we (particularly drivers) tend to go into an 'auto-pilot' mode and are functioning on a much less concious level than many realise when doing routine things is key too. There have been a lot of studies on this, and it is quite shocking how very unaware people are on their daily commute to work, and im not sure it actually occurs anywhere outside the 'get in the car - drive x route - arrive at work and wake up properly' context. People tend not to notice anything that doesn't actively impede that normal routine (so they would notice a road accident that stopped traffic, they probably would not notice a herd of elephants at the side of the road all dancing the can-can, as long as it doesn't stop the traffic and jolt them out of their auto-pilot.)
Humans are very routine creatures and we also see people forgetting children when they've just had a baby and are not used to taking a baby with them to places - this accounts for a lot of the 'I forgot to get the (sleeping) baby out of the car at the supermarket and also the less remarkable as less dangerous instances where people have forgotten to put the kid BACK in the car, having parked a pram somewhere in store and moved away to get something.
In the days when people left prams/pushchairs outside stores, forgetting to collect the baby for the walk home was not at all uncommon in new parents!
There are lots of schemes and gadgets and protocols you can adopt to ensure it doesn't happen - these tend to be exactly the sorts of things new mums post about on MN, that they want to do, do themselves but MIL or FIL or their own parents refuse to do because they're being 'PFB' about it or they're being over dramatic. Unfortunately the sort of person who pooh-poohs a 'check the back seat before you leave the car' routine, who thinks 'it'll never happen to me' is exactly the sort of person who can end up leaving a kid in a car to boil to death!