[Hrm...] To be honest, I'm not entirely sure. If I recall correctly, according to the Pokedex it's a "Spirit Pokemon" that is usually found wandering the ruins of ancient civilizations, so perhaps they acquired these masks in places like these. Or, are even from ancient times themselves, as the masks, although simplistic in design, may represent a face that they once had in a past life. [To be more exact, the faces are based on when they were a human in a past life, but Ash's dex didn't quite elaborate on that part.]
Either way, they're certainly Pokemon with a mysterious taste, as well as being very attached to those masks--separating one from it's mask can have consequences for the unwitting person who does so, as these Pokemon will do whatever they can to get them back. Attempting to wear them or having one's face too close to it in general is also unwise, as Yamask, using this mask, can also possess and take over the mind and body of the unlucky person who wears it...
[And that last part isn't just spooky speculation, that actually did in fact happen. You get three guesses who got possessed and the first two don't count.]
voice;
Either way, they're certainly Pokemon with a mysterious taste, as well as being very attached to those masks--separating one from it's mask can have consequences for the unwitting person who does so, as these Pokemon will do whatever they can to get them back. Attempting to wear them or having one's face too close to it in general is also unwise, as Yamask, using this mask, can also possess and take over the mind and body of the unlucky person who wears it...
[And that last part isn't just spooky speculation, that actually did in fact happen.
You get three guesses who got possessed and the first two don't count.]