Bean throwing to drive out misfortune did not originate as a household custom at all; it descends from an exorcism ceremony imported from continental Chinese court practice, tsuina, adopted into the Japanese imperial court's own New Year ritual calendar centuries ago, in which court officials ritually drove out disease bearing demons at the year's turning point, a solemn state ceremony rather than the family activity mamemaki has since become. Over the centuries that court rite filtered downward and outward into popular practice, its ritual demon expulsion simplified into the throwing of roasted soybeans at a person, often a family member, wearing an oni mask, accompanied by the now familiar chant calling for demons out and good fortune in, a domestication of an originally elite court ceremony into an annual household activity performed by ordinary families and by shrines and temples for large public crowds.
A much more recent addition sits alongside these older layers: eho maki, an uncut sushi roll eaten facing that year's auspicious direction in silence, is a comparatively modern practice, promoted heavily by convenience stores and retailers expanding a regional custom into national popularity mainly in the latter part of the twentieth century, making a single evening's observance today a genuine composite of an ancient imported court rite, a folk domestication of it, and a recent commercial addition.