For example, Starbucks developed its own point system where customers can collect them and get a free drink. Pretty sure there is a way to make money from it. Or is it just a marketing strategy to attract more customers?
Suppose you sell 100 cups of coffee a day. Cost of 100 cups-worth of coffee beans: $20. Revenue from selling 100 cups of coffee: $220. Profit: $200.
Say you entice people to buy more by giving them points each time they do something you like, such as when they buy your widgets. Say you end up selling 120 a day, but 10 of them are given away as people redeem their points. Cost/Revenue/Profit: $24/$242/$218
So you've made an extra $18 profit even though you've given away 10 cups of coffee.
That’s the foundation of how point systems work.
If the system is sufficiently popular and people are willing to pay for points, you can then build derivatives off this platform.
Many loyalty-point systems are tied to a single provider - you redeem the points at the place you earned them. But in Australia, there is a consortium that allows you to earn points from different restaurants and redeem them elsewhere. There are probably such consortia elsewhere globally. Some systems such as Frequent Flyer miles allow redemptions on behalf of others (even if just family members). Some credit card point systems allow donation of points to charitable causes.
Even with all the derivative action going on, you don't care, so long as the points are doing what they’re supposed to - increase paid volume. If they don’t, you take the points back or revamp the system to benefit your business, subject to whatever you’ve already agreed with the points holders.
As far as you are concerned, you're just giving up a bit of extra revenue to make more. That is, point systems are basically a form of marketing.
Or is it just a marketing strategy to attract more customers?
Attracting new customers is not the main goal. Keeping frequent customers and getting them to be more frequent (spend more) is the goal. Most of the money is made from frequent customers.
When I am an infrequent customer, I am sometimes annoyed, I feel like I am being cheated, why not just lower the price and not have an awards system. But, the company doesn't care too much, they are not making their money from me.
Points are marketing. Sometimes the points systems are revamped because they become too popular and the benefits that people collect exceed the benefits of increased sales that the company was expecting. Sometimes the benefits are too hard to collect, and the public recognizes it and doesn't participate; so they have to be improved.
Some things like airline miles, gift cards, and points earned in online gaming, have an underground market. The risk is that the exchange of points and money in that unsanctioned market is risky. One side can ripoff the other. There is also a risk that the company discovers the points were bought and cancels their account. Thus they are out the money, and any points in their account that were legitimate are now gone.
In addition to encouraging consumer spending, there is another way in which reward points systems (often called loyalty programs) make money for their originators: they allow vendors to tie each purchase to an individual. Combined with program members' demographic data, which they willingly provide when they subscribe, this helps vendors to analyze their customers' behaviour in greater detail and subsequently develop more efficient marketing strategies targeted at specific groups (segments) of customers.
Sometimes loyalty program owners also sell their customer analytic data to (non-competing) third parties.
This works much like Google tracking your web site visits via individualized cookies.