It is said in D1 that the children of tristram were abducted by the fallen, only Wirt survived. I believe the fallen following Azmodan’s orders took the children to the dark coven , The witch Adria. The coven using dark power provided by Greed and her lesser goblins infused the children. When this dark power manifested enough energy within the child they exploded and the 5 new hybrid treasure goblins were born. The 6th child Wirt that got away, was found by Griswold. Even though Wirt got away he was still infused with Greed’s dark power. Pepin healed Wirt by removing the current power built up, isolating it into the boys leg and removing it.
As for Wirt, he was still tainted by Greed. And the power infused in him was still growing. Which gave him such skills to be the merchant he was in Diablo 1.
I believe some time after D1 a Necromancer came to tristram and tried to cure Wirt of his curse that was re-manifesting within the boy. But was only able to pass the cursed power to what Wirt loved most, his closest pet/friend a cow.
And so years later the cow king was born. Now infused with Greed’s dark power much like the treasure goblins. The cow king emerged out of Wirt’s friends body by exploding cow. Explaining Wirt and cow body’s all exploding.
The Necro moved on taking with him Wirt’s cursed leg as payment. Transforming the leg into a grand charm. Wirt’s leg would go on to become Gheed’s fortune grand charm.
As for the 5 Treasure Goblins were now know as Azmodan and Greed’s children. Funding Greed’s, greed and Azmodan’s war efforts with loot and gear in Diablo 3.