How did the Finno-Ugric language family spread itself so erratically?
It happened over several millennia. Neither the Finns and Estonians nor the Hungarians live today anywhere near where their ancient ancestors lived, in western Asia and the easternmost parts of Europe. The people who spoke the common ancestor language of all three languages lived around the third century BC. The group split; the ones who went north and west became the Finnic branch, and the others became the Ugric branch. Hungarian belongs to the Ugric branch, but it has been going its own way since the first century BC.