The other answers have correctly identified that the freebies are a hook to attract new customers. However, the behavioral component hasn't been directly addressed.
If a casino is willing to give away free plays to get new customers, why doesn't a filling station give new customers free gasoline? Why doesn't a grocery store give new customers free bananas?
The difference is, rational versus emotional purchases. Products that are purchased rationally (gasoline - no one has an emotional attachment to buying it) are sold with marketing tactics that appeal to logic (best price on the street, most convenient, etc). Meanwhile, products that are purchased emotionally are sold with emotionally-driven tactics - and as a subset of that, products that are purchased addictively are sold in a way that exploits that behavior.
Gambling is obviously addictive - in the extreme sense, but even for customers who aren't literally gambling addicts, there's an emotional drive to keep playing once you've started. Gambling gives you a rush, but it's inherently unsatisfying most of the time. If you're winning, you want to keep playing so you can keep winning. If you're losing, you want to keep playing so you can recoup your losses. It's not for most people to play once and then walk away. Essentially, on a play-by-play basis, the casino doesn't care if you win or lose, because they know that on average, over a large enough number of players and a large enough number of plays, they will always make money. The games are, of course, literally designed to be in their favor. And there's a built-in sense of loyalty, at least in the short term - once you've made that first play on their game, and you're hungry for your next play, you're probably just going to hit the button and play again - right there, on their game - versus immediately going to some other casino. So, once you've played the first time, you're essentially their customer.
On that note, a casino's entire marketing tactic is designed to get you to make that first play. They know that the system will take care of itself once you have. And the more players take that first play, the more money they make. So, they want to maximize the number of first plays. Hence, their marketing tactics are essentially driven by attracting new customers.