As a Perl trainer, I have to answer the questions from students. It's my job.
...
If you're like me when I was very active in usenet, you use the questions as challenges to learn more about
Perl.

Perhaps you are using the questions not only to work out almost forgotten corners of your skill, but also improve in the art of expressing yourself. I guess some of us may be labelled as "consultant", which is as unspecific as "system engineer", but involves more guessing at needs, expressing yourself, discovering XY problems, keep an eye on appearently unrelated things an so forth.

If you are like me, you don't think about "what do I get out of it", you simply have the urge, being long time overpaid and helped by others - specially by all those that made perl into what it is today -, to give back. There's little you could give to them, so you give to others. You let the universe draw the sums; it's not your job to keep track.

Then there are those with a socialist inclination, and they would ask your question as what do WE get out of it? since they rather live up to "first we, then I". I would like to count myself among them more often than not.

You have some urge to answer, so you're satisfying some personal motivation. That might be to advance a political agenda or a desire to shape the world in the way that you want it to be.
Those with a socialist inclination usually have it because alone they have nothing but with the group they get something. That's the root of why socialism doesn't work. No matter how much you think it makes sense, human nature involves self-interest, even if you deny that you have it.