It’s interesting that people from biblical times thought of hell as being deep inside the earth without knowledge of what’s actually there.
People even prior to biblical times, mined for various minerals, and knew the deeper you go, the hotter it gets. Not much of an intellectual leap to extrapolate from that.