GTA V was given for free by Epic Games Inc. in collaboration with Rockstar games.
GTA V was hosted free on Epic Games store for a limited period of time (21st May), after which the game came back to it’s original price.
GTA V was being offered for free because it’s developer, Rockstar North is likely to expand it’s customer base, thus they will be able to boost their upcoming game GTA VI’s (which is expected to come out soon) sales.
Microsoft runs a program called Rewards Points. Every day you can earn points by looking at:
A pre-formed search query that uses Bing.
A silly preference poll that will then show you a search query from Bing.
A short quiz, which you can find the answers to with a background window searching Bing.
This will get you from 30 to 70 points per day, depending on the quiz. If you come back every day, you get free points just for showing up to the page to check. This takes less than 2 minutes every day. I have Cortana remind me to do it.
After you've registered, any query you run in your browser from Bing will give you 10 points. Same with mobile queries. They regularly run promotions that double the points from mobile queries.
Other program groups and software divisions at Microsoft advertise through this Rewards program. You'll get free points for all sorts of stuff they're currently promoting. Just open the page advertised.
You'll be able to get 300–500 points per day. With 30,000 points (usually less, they run specials) points you can buy your yearly Xbox Gold subscription. You'll want this to go online. Another 30,000 points buys a yearly Game Pass. (GTA V isn't in the Game Pass). With 4500 points you can buy a $5 Xbox gift card. With 5500 points you can buy a $5 Amazon gift card.
It's regularly $30 on the Xbox store. If you think that will take too long, wait for GTA V, or any other game, to go on sale on the Xbox Store, and use accumulated points to buy enough gift cards. I think I've seen GTA V as low as $15 in a sale for Xbox. Last week I purchased Red Dead Redemption for $10, through gift cards redeemed from Rewards points.
If you are buying for PC you don't need the Xbox subscriptions but you'll have to go through Amazon. Sales and used copies go for as cheap as $10 for GTA V.
The Microsoft Rewards program is a really great deal if you want things like games.
Go here: Manage Your Microsoft Account in One Place
EDIT: Quora says this is getting a lot of views so this should summarize quickly and state it's not specific to GTA. Unless you need immediate gratification with recent AAA games, a year of collecting points gets you: Xbox Gold sub, which gives away three games a month to own; Xbox Game Pass, which is the rental library; and enough left over to buy two or three aging AAA titles. Every year. For nothing. For a casual gamer with an Xbox this is everything.