jQuery's Core Team Member, Dave Methvin has a great write up on LearningjQuery.com called "Using jQuery's Data API". He walks us through the beginning thoughts on what the .data() API was meant for, a DOM based In-Memory storage, to how it evolved into reading the data attribute in HTML5. Dave outlines 5 rules of the road for using .data():
.data()
data-*
jQuery.data()
You can read more about the history and the rules of the road over at Learning jQuery.