Out in the wild, it is quite uncommon for a goat and an elephant to cross trails. They live in climates and different areas.
That is exactly why when an elephant calf found itself on secure parkland in Nepal with a miniature goat, the large infant was startled (to say the least). When the goat was seen by this elephant, it ran away as quickly as it could.
Listen that infant elephant could not get to its mother quickly enough! Who understood that goats were terrifying? I definitely did not. I wager that goat did not even understand how frightening it was. He just needed a fresh buddy to play with.