My own experience (and plan) was to create Moodle plugins that became popular. This was a goal in itself as I would like my contributions to be my way of making a tiny dent in the universe and making the world a very slightly better place.
At the same time I also hoped it would build my reputation, massage my ego and also to secure employment and so I would benefit economically (and also do what I enjoy. This has worked well for me so far.