Android and iOS don't let mobile apps run continuously in the background. If an app is closed or in the background, it generally can't talk to its own servers.
Instead, Google and Apple provide a service that allows the apps' servers to push a message even if the app is closed.
In Google's case, it's to reduce power usage. Having to listen to one service only (FCM) uses less power than if each app/service was listening on their own. They state this in their website