The first question has different answers but in its most common form in North America, it is about rewards. So you sign up for an airline frequent flyer program in the hope that over time you will accumulate enough miles to get the free tickets. Since the switching cost is high, people will stay even if the experience is not great. In some ways this actually reduces the incentive for good service since these are not loyal customers but 'bonded' customers.
Another way of thinking about this is that if you didn't have such FF programs would customers still fly with the airline? I am guessing that in many cases it might be no because the experience isn't a great one. And experience is really the key to loyalty. I remember an acquaintance once mentioning his experience with Singapore Airlines - he was flying from Chennai to Tokyo via Singapore and on the Chennai - Singapore leg the stewardess accidentally spilt the soup on his suit trouser ( he was wearing the suit since he had an am meeting in Tokyo to which he was going directly from the airport) . She apologized profusely, then the Captain of the 747 came to him and apologized. But that wasn't all - a little later a stwardess came and took his Trouser measurements. When they landed in Singapore he was called aside and presented with a brand new trouser that was his perfect size!! Mind you the Chennai to Singapore flight is just 4 and a half hours and it reaches Singapore early in the morning so the airline must have woken up some tailor in Singapore in the middle of the night / got a trouser from some store and then sized it correctly - this person is very short so normal readymade trousers aren't of the correct length.
That is pretty exceptional service!
So what about a good expereince in the online space? I am currently involved in a promo in Mexico called www.ganabuscando.com and we have realized that for a good experience it is important to keep the users engaged. To do this we have devised a program which has a) a mental challenge b) a sense of competition c) dynamism in the form of daily questions that the users need to answer and d) rewards. The results have been very encouraging so this is possibly the way to go... If it is just about rewards or about lower prices, we will get transactional users who may or may not stay.