That's a pretty ingenius hack. More limited in use than a real cookie (real cookies are sent along with every request; even for images etc), but still pretty cool.
one purpose is webtracking, especially in the affiliatemarketing niche, which "suffers" from cookie deletion because the cookiebased-tracking then does not recognize visitors and thus affiliates don't get paid... fingerprint methods are another alternative, although less precise and more difficult to implement.