The Museum of Hoaxes explains coning:
Coning (or cone-ing) involves ordering an ice-cream cone at a fast-food drive-thru window, and then taking it by the ice cream instead of the cone when it’s handed to you. If you do a search for coning on youtube, you can see a lot of examples of it. Even Justin Bieber is a fan of coning.
It’s a strange prank because it inverts the typical logic of pranking. Usually pranks involve humiliating or one-upping a victim. For instance, a victim sits on a whoopee cushion, prompting everyone to laugh at him. But in the case of coning, the prankster pays for the ice cream cone and then proceeds to ruin his own cone by grabbing it incorrectly. The person handing him the cone isn’t put out in any way. They may be puzzled by the strange behavior, but they’re not inconvenienced. In other words, in coning the prankster becomes the victim of his or her own prank.
I was confused by this until (at the risk of greatly overanalyzing this) I realized that coning is essentially a form of breaching experiment. Breaching experiments are a form of experimentation used by social psychologists. They involve acting in a way that violates an unwritten rule of social behavior, and then observing how people respond to this violation. The experiments reveal that society functions smoothly because we all (usually) obey these unwritten social rules. Sniggle.net has collected some examples of famous breaching experiments, which include volunteering to pay more than the posted price for an item, ordering a Whopper at McDonald’s, or saying hello at the end of a conversation.