We get invited to do things for all sorts of reasons.
It may be to reluctantly reciprocate a previous invitation, to extend the hand of friendship, to thank you for something, to manipulate the gender quota of invitees, to increase the glamour of an event, or indeed (imagine!) because someone really really wants you to be there.
In my experience, it’s best not to worry too much about why you have been invited. Just focus on the fact that you were, and if it’s something you want to do, show up ready to give of yourself.
You may even be invited back then…