Counter to what most people assume, the word piñata is Chinese in origin, not Hispanic, and the figure was first used to celebrate the arrival of spring.
Marco Polo encountered the custom during his travels in China and brought it back with him. From there it was adopted across Spain, France and Italy.
When the Spanish conquered Mexico, the tradition crossed the Atlantic with them and took on the form we recognise today.
So the short answer: the Chinese made the piñata.