I would never say "enjoy the rest of your day" (ETROYD) to anyone. If a sales assistant says this to me (it always is a sales assistant; their manager obliges them to do it), I think:
-- how impertinent of you to suppose that the enjoyableness of the rest of my day depends on your wishes
-- how disrespectful to assume my life to be about having a good time
-- how presumptuous to assume that I am in any position to enjoy the rest my day, even if that were my purpose.
I know that the sales assistant is not the instigator of this behaviour, so I reply with a courteous "thank you".
To answer your two questions: (1) the purpose of the remark is to make the customer feel loved, and so return to the shop to get more love. (2) Since it is insulting to the customer to expect that he or she will be warmed by a forced insincere formulaic remark, I would call it an insult.
Edit: In view of the response to this post, I have returned to look at it critically. What is wrong with it is that the words "I think" telescope my actual response. The correct expression is "I cringe". The listed thoughts are not permanent statements that I wish to lay down for posterity; rather, they are a caricature of the transient subconscious thoughts that, in my self-analysis, are provoked by ETROYD and cause me to cringe. I stress that I bear no ill will towards sales assistants, or even their managers. I am happy that the majority of people on this site find ETROYD harmless or even pleasant (I only wish I could!).
To maintain the relevance of the comments the above post has drawn, I leave it as it was except to make it clear throughout that I am referring just to ETROYD.
Edit: A year after this posting, I notice that people have stopped saying ETROYD, in my part of the UK at least.