The simple answer is that it pays off in sales of wine. I suspect that having a good experience makes one more likely to think positively of a winery and its wines. Also, a little alcohol might make one less inhibited about buying a bottle or more.
Exactly as Robert said… I happen to work as a supermarket food-sampler and I know that some experts believe a day of sampling can produce a 10-week increase in sales.
Please note, that "10-week increase" does not mean that I sampled stuff on Tuesday, so we expect an increase in sales for the next 10 Tuesdays… no; it means we expect an increase every day for the next 10 weeks.
Turn that back down to every Tuesday and which winery would sneeze at such an increase?
How come wineries and/or wine tasting events often so generous in giving samples?
All the reasons that Eric’s answer has suggested are all seemingly quite true.
We have a winery near our residence that demonstrates everything Eric mentions.
On top of that they prepare a 10 grape variety wine each year. If you can name 8 out of the 10 grape varieties involved in the wine you can walk out with a free bottle. It is great publicity and guessing right or wrong the winery is making great sales!