Pumpkins are often used to create jack-o-lanterns on Halloween.
You can buy pumpkins at many local farms in October. Many farmers grow pumpkins for the sole purpose of selling them for Halloween. Or, many grocery stores also sell pumpkins.
There are theories why the first people carved pumpkins. One, is the man teased the devil into a tree so he couldn't get out. When the man died the devil cursed his soul to walk the earth with a gourd lantern. Which then people started carving the pumpkins instead of gourds. Another is, people carve the pumpkins to keep away bad spirits.
The reason people put pumpkins out on Halloween started a long time ago. People believed vampires and mythical creatures were real and were going to "haunt" them. Myths say that vampires and mythical creatures such as werewolves hated the smell of pumpkin and got scared of the jack-o-latterns on them, so people put pumpkins out on Haloween to keep away the vampires and other mythical creatures.
It is believed that the custom of making jack-o'-lanterns at Halloween, from turnips or pumpkins, began in Ireland. In the 19th century, turnips, hollowed out to act as lantern frames and often carved with grotesque faces, were used at Halloween in parts of Ireland and the Scottish Highlands. The purpose was simple: by illuminating the scary face carved into the vegetable it was believed that the souls of the dead would be frightened away from homes thus ensuring the safety of the occupants and the next harvest.
Currently, jack-o-lanterns provide fun decorations and desgins to being a festive mood during Halloween.
Of course, he is the purpose of the Halloween movie franchise.
to scare away vampires
The purpose of Halloween is two scare you so bad you pee and then to make you very fat by eating all the candy you get or the left overs you have from handing the rest out to the trick or treaters.
The purpose is to show that white men can't go hunting on those grounds and that it is owned by the Beaver trbe.
From Wikipedia: " A goblin is a legendary evil or mischievous illiterate creature, described as a grotesquely evil or evil-like phantom." Very fitting for Halloween.
I've seen it done before but I don't think there really is a purpose--I think it's just a weird kind of hobby just like scrap booking or drawing.