This isn't really about Cassandra or MongoDB but rather about the maturity of the languages the systems are written in and the languages of the various supporting APIs.
Cassandra itself is written in Java whilst mongo is in cpp, when thinking about their ecosystems (or as you call it their stack) and the various langs that play a part you need to just think back to what makes a particular programming language advantageous. Below is my highly minimalistic take on the matter since there are many books and blogs covering this exact topic.
- Popularity and community support. Hipster languages are really cool, until you don't understand what's going on and there's no one to help. Both c++ and java are very mature languages with a big user base. Both systems have various APIs that are implemented in popular languages.
- Efficiency - I'm not going to get into a which lang is faster or more feature rich argument but we can safely say both dbs are again using very efficient languages that are continuously getting better.Plus at the end of the day, if the developer doesn't do their job properly, a lang's performance might be their last concern when it comes to optimisations.
At the end of the day Cassandra is well known for its massive scale [1] and Mongo has been pointed out to have scaling out issues, but this isn't because C++ has problems (lookup the magic that Facebook does with c++ and php) or because Java is some king of amazing big-scale language. It's just to do with how the systems have been implemented.
[1] From https://cassandra.apache.org/ (There was also a presentation by Apple at the 2014 C* summit)
One of the largest production deployments is Apple's, with over 75,000
nodes storing over 10 PB of data. Other large Cassandra installations
include Netflix (2,500 nodes, 420 TB, over 1 trillion requests per
day), Chinese search engine Easou (270 nodes, 300 TB, over 800 million
reqests per day), and eBay (over 100 nodes, 250 TB).