Text this: The galaxy-IGM connection in THESAN: the physics connecting the IGM Lyman-$α$ opacity and galaxy density in the reionization epoch