Grafting has probably been invented somewhere closer to Central Asia around four to five thousand years ago and then it has spread through Western Asia and through Europe, about at the same time with the spread of the domesticated horses and with the spread of the Indo-European languages.
Before the invention of grafting, there were only a little more than a handful of cultivated species of fruit trees, i.e. mostly those which produce clones naturally (e.g. grape vines, olive trees, fig trees, date palms and a few others). By using grafting, a large number of additional fruit trees could be cultivated, starting with apples and pears.
The reason why grafting is necessary is that in most cases the trees grown from the seeds produced by a tree with big and sweet fruits may have small and sour fruits. To preserve the properties of the original tree, it must be cloned. By using grafting on an appropriate rootstock any tree can be cloned.