That innocent ice cream sundae you're enjoying on a hot summer day, it may have been invented to skirt the law.
While the exact history of the ice cream sundae is contested, one theory points to a crafty legal loophole. Blue laws are religious laws in the United States that once banned (and in some states continue to ban) certain activities on Sundays, from selling liquor to visiting a neighbour's house to "misbehaviour" of any kind.
One such law in the late 1800s forbade the sale of soda on the Sabbath. (Why soda was considered dangerously 'frilly' is not totally clear.) Seeking a substitute for the hugely-popular ice cream soda, crafty druggists at soda counters swapped out soda for syrup and created the ice cream sundae.
The dish was originally (and somewhat brazenly) called a "Sunday," but the spelling was soon changed to "sundae"—perhaps out of religious deference or maybe expand the availability of the treat to other days of the week.