Because having the better product (often) doesn't matter: see Windows vs Apple in the early days.
Mongo has a strong community, which translates into a plethora of articles/blog-posts/tutorials/etc that secures its niche. From there it's possible to make money with things like consulting fees to help fix the problems it created in the first place.
It's all about execution. Case and point: I know what (purportedly) makes MongoDB special. I have no idea what RethinkDB is supposed to do, other than store data. Yes, I could check their site, but the point is I'm already familiar with Mongo's reputation. All of this contributes to a lesser product winning over a better one.
At my last workplace, I finally asked: "Since you guys bitch about mongo so much, why do we use it? Why not something else?". Response: "It's not actually that bad, it does the job".
Half the crap people speak about Mongo seems to be from either the early days, or from people who just like to complain. It certainly has it's issues, but there doesn't seem to be much community will to replace it with $superdupernosqldb.
Despite some of it's crappiness MongoDB actually has a bunch of features that other databases (such as PG) don't such as easy to set up sharding and replication.
We run Mongo side by side with PG, and even though the PG is just replicated and not also sharded like our Mongo cluster is, Mongo was more easy to configure.
I think MongoDB's biggest problem is that it was marketed as the general purpose DB in the Node.js community when actually it is a specialised tool. So now you have thousands of developers wondering why they're on this weirdly behaving document store when they could've scaled fine on something more generic like PG.
More on topic: RethinkDB was aiming to be the best of both worlds, generic like PG yet document oriented and horizontal scaling like Mongo. I think their problem is that they didn't manage to pierce the communities. It would have gone better if they had evangelists for every major platform that just produced a stream of blog posts, small open source projects and tools and crashed random meet ups.
Well, real streaming queries, not just oplog tails for starters... a document database with the ability to do on-server joins. There's a few other things, but those are the two biggest ones over most others in the same mold... All that applies to Mongo, applies to rethink.
Oh, yeah... and the ability to do shard + redundancy, where mongo you're either or have to do both. So scaling works a bit better. The admin tooling for rethink is better than anything I've really used in non-sql databases. And frankly even better than db admin tools, including sql based ones.
It's just a really great, stable database with really good scaling for the majority of use cases.
Mongo has a strong community, which translates into a plethora of articles/blog-posts/tutorials/etc that secures its niche. From there it's possible to make money with things like consulting fees to help fix the problems it created in the first place.
It's all about execution. Case and point: I know what (purportedly) makes MongoDB special. I have no idea what RethinkDB is supposed to do, other than store data. Yes, I could check their site, but the point is I'm already familiar with Mongo's reputation. All of this contributes to a lesser product winning over a better one.