Shame was a potent punishment hundreds of years ago. The man forced to wear this mask had stuck his nose into too many peoples' business; or the horns might indicate he'd been cuckolded by an unfaithful wife; or maybe the person simply had very bad thoughts as symbolized by the snake and the devil.
In tiny villages where people lived their entire lives within a few blocks of each other, one's reputation was important. Being mocked or shamed by all your neighbors was painful, so magistrates found imaginative ways to punish people by placing them in embarrassing contraptions.