There are two ways to get someone to contribute to society, for varying definitions of "contribute" and "society."
One is to require it of them, and to deprive them of their wants or even needs if they don't perform as demanded. The other is to give them such abundance that they cannot help but share.
Everything that I've seen suggests that the latter is much more effective, and that nearly everyone uses it whenever possible. They reserve the former method for people they don't like, or that they feel entitled to exploit because they do not see them as people.
This site is hosted on Dreamwidth, fandom enclave extraordinaire, so let's talk about fandom to start with. "Pirated" shows, lovingly subtitled by their fans, helped turn anime from an art style into a major Japanese export. Fandom could not get enough, and paid generously both through buying official and licensed products (once they became available) and by creating fanwork such as cosplay.
I used to be a professional writer, before things went south for me in that department. My best work, both in "pageviews" and in self-perceived quality, was what I was most passionate about, because I wanted so much to share with people what I'd learned. Whether because I was excited about it, or because I was incensed and wanted to share my moral outrage, or raise awareness of an issue.
Sometimes I needed a deadline to get me to write. But when my work became all about deadlines, and the supervisors who had stood up for me mysteriously went absent, and new rules kept me from writing essays like the ones that had won me awards and made lots of money ... I actually shut down from stress. I couldn't do it anymore, not and deal with my sudden personal / family crises at the same time. It wasn't until I felt secure with my partner's financial support that I could coax myself into writing again, to help my partner with expenses and to reward myself with a few games and toys.
I contributed the most to free and open-source software when I felt the most valued by its community, especially when they paid my living expenses as part of the Outreach Program for Women. I was so grateful to my sponsors and mentor, and even though I was living with untreated major depression I pushed myself to work on GNOME. Not just to give back to my benefactors, but because I believed in GNOME's mission and I wanted underprivileged girls to have a free OS of their own.
When the cheques stopped, the program ended, and community interactions showed me how little the free software world valued both women and "women's work" outside of anomalies like the program, I was surprised to find out there was nothing to keep me devoted to them. And that I liked Windows 8 a lot more than free software OSes, and that Microsoft, even as a for-profit company, was sharing a lot more with people like me than the free software "community" was.
Share the wealth
Now I'm surrounded by toys and games in abundance, and the one thing I most want to do is make something worthy of them, and of the people who gave them to me. I want to use the talents that I seem to have, to make artwork like fanfic and models and RPG books, and share them with those who appreciate them.
I play single-player video games, and trim plastic models, and read books curled up in my den, and it makes me want to give back. Not because of duty or forced gratitude, but because it's a natural expression of how I feel. I have to write things that continue the story. I have to share screenshots and work-in-progress photos, and enthuse about things that excite me, and find people to be excited with.
I feel so inspired, I have to share and create.
I think that's how it is for most people.
I think people who don't, or won't, or can't, at least not in socially acceptable ways, don't deserve to starve or be homeless.