MongoDB and PostgreSQL are different in architecture and intended use cases, this answer explains why MongoDB might be the better fit in certain scenarios.
why should we use mongodb instead of postgresql?