I assume your first code snippet was intended to be:
$this->mongo_db->where("category", getCatID("games"));
// or…
$this->mongo_db->where(array("category" => getCatID("games")));
I've not used this library, but from perusing the source code, it looks like all query criteria set by where() is accumulated in an internal $wheres property on the Mongo_db class. This only gets cleared by the private _clear() method, which is called from the following public methods:
Any time either of those terminating methods are called, $wheres will be reset. Likewise, if those methods aren't called, older criteria may bleed into your next criteria. In your case getCatID() may be clearing out earlier criteria. PHP is going to execute getCatID() before invoking the where() method in which it's an argument, so I'd expect that outer where() call to see an empty $wheres array.
One solution would be to call getCatID() on its own before building your second query. Alternatively, you could clone the Mongo_db instance to ensure that each query is built independently.