The Santa hat is usually earned by winning races rather than obtained directly. It is a rare prize, so patience helps. Some players also report getting it through special Mario-related challenges.