How does Magento 2 detect whether it should use its database or filesystem to store the visitors sessions?

Context: How is the session initialized?

Magento\Framework\Session\SaveHandler::__construct()

Magento\Framework\Session\SaveHandlerInterface::DEFAULT_HANDLER