Heroes somehow drop gold at gates in home realms
When you summon heroes in home realms (both), there is a chance that a pile of gold will appear within the area of heroes gates. You can pick gold from the sacred earth piece before the gates, but you can't pick it from the gates, and workers can't pick it too. At first I thought it happens because miners get killed by defenses right after they spawned. But then I moved away all defenses, and never attacked heroes until they move far enough from the gates. And yet it still happens sometimes, right after summoning heroes a new pile of unobtainable gold appears at the gates. My guess is when the game creates heroes and gives them random amount of gold, it may exceed their capability to carry it, so they drop it.
I'm afraid you missed the second part of the bug report. A gold pile has a chance to appear right at the gates even if no one dies there. Right when the gates create heroes.
Just now I restarted the Casita home realm and spawned a few groups of heroes with 9 level. Since I didn't have any minions or traps in the whole dungeon, no one could possibly die. And yet I already have 3 piles of gold right at the gates. If I'm not mistaken, it sometimes happens when the gates spawn sappers.