I'm on the other end of the spectrum, I have a bunch of low popularity projects on Github (Python, C, Puppet, a little bit of Perl). Low popularity meaning above 0 users, but users can be counted on your fingers.

My motivation are often the following:

* I've encountered common issues at work that are generic (ie not tide to the functional domain of my employer), with no time to spent on it at work, as a consequence I chose to implement the thing on my free time and open source it because it kind of frustrated me.

examples:

- web UI to manage DNS zones content, (previously the team was managing their dev boxes IPs in an excel sheet).

- web UI for LDAP management, with a simple notion of "Roles".

- tools to convert Visio files (specially stencils) to SVG as my company wasn't big on buying Visio licenses, and I was under Linux 99% of the time anyway.

- a generic enough puppet modules to manage samba.

* To learn new stuff or be better in a specific language. I've a bunch of project like that, were part of the goal was to unrust my skills or to learn how to setup unit test, continuous integration and code coverage. This is the way I learned pytest, cunit, gcov, Jenkins, Travis-ci, CMake.

Sometimes my motivation are a little weird. One time, I've created an empty repository with a description and didn't start the implementation of what I had in mind. Someone stared it out of nowhere, and I felt compelled to actually implement it. It did learn me in the end that if you want a good "ini" like parser in C, OpenSSL is quite decent with a permissive license.

Another time, I created a very rough Python library to display histograms in ASCII. I just dump it on GitHub with no setup.py, nearly no documentation and everything pretty much unorganized (initially, it was an half baked stat module for an IRC bot). Someone submitted a PR righting the thing (proper layout, a setup.py file, the thing being published on pypi and some rst documentation). I accepted the PR gladly (and a few others after that) and I felt compelled to add at least some unit tests.

This library code is absolutely horrible (even me, the creator, I spent a few days figuring out all the edge cases), bu strangely enough, it's my most successful library/tool (yay, a whooping 81 stars \o/) and people do contribute to it.

It brings me to another point: external contributions.

From what I've experienced, people will more often create issues than submit PRs. That's ok, but it can also be a little bit of a strain if your are the sole maintainer of a project as I am. I know that on some of my projects, issues can be left unanswered for months if not years.

For PRs, you are more likely to receive PRs if your language is easily accessible. On my Python projects, I got a bunch of PRs, some of them far beyond simple bug fixes (ex: implementing new really interesting functionalities, like color support in the previously mentioned ASCII graph library).
In my C projects, I almost never get PRs, and I'm guessing the language is a huge barrier, even if, in my opinion, the code is far more readable and structured than some of my Python projects.
An interesting mix of the 2 is actually a Samba Puppet module. I've a bunch of Puppet DSL code, where I've received ton of PRs, but I've also a little ruby code (type providers), this one I almost never get PRs for.

Lastly, for a bunch of my project I feel a little culpability since I don't maintain them appropriately, there is a bunch of my projects where I lost interest in the subject (example, my puppet module: I don't use Puppet anymore). But at the same time, I feel a little responsible for all the people asking me questions or submitting bugs to these projects.

PS: why fundamentally do I contribute in Open Source? Mostly because of: hey, I've implemented this, it was useful to me at some point, it might be useful to other people, why should I keep it private? Other people could pick it up, and use it to do some incredible things.