FYI, I and others tried to answer a very similar question here → Hue bridge died - options?
One of the main points is that Zigbee uses mesh networking technology but only does so with Zigbee Router devices on the same Zigbee network, so having devices on different gateways/bridges/hubs will not extend your Zigbee network and there is no Zigbee communication what so ever going on between different Zigbee networks, no matter if the devices can be controller together at the application level.
Note that if you want to use the ZHA intration or Zigbee2MQTT then you do not want to buy Sonoff Zigbee Bridge (that is just another proprietary gateway/hub), you instead you want to buy a Zigbee USB dongle, like example ITead’s “Sonoff Zigbee 3.0 USB Dongle Plus” (model “ZBDongle-P”) .
Regarding how Zigbee fundamentally is meant to work you might want to read the updated ZHA introduction from this PR → https://github.com/home-assistant/home-assistant.io/pull/28869
Introduction
ZHA integration is a Zigbee gateway implementation that supports the Zigbee 3.0 standard as well as supporting earlier Zigbee standards for home automation and lighting devices. It follows the Zigbee PRO specification, a low-power wireless communication protocol which uses small digital radios to create a private Zigbee network that can connect compatible devices within a local area.
A Zigbee network can have three different types of devices; “Zigbee Coordinator”, “Zigbee Router”, and “Zigbee End Device”. A Zigbee network always needs to have one Zigbee Coordinator (it can never have more than one), and Zigbee devices can never be connected to more than a single Zigbee network (or Zigbee Coordinator), however, a Zigbee network can have multiple Zigbee Router devices and Zigbee End Devices.
Before installing the ZHA integration in Home Assistant, you need to connect a Zigbee Coordinator adapter. Those normally come in the form of a USB dongle that plugs directly into the same computer that is running your Home Assistant installation. The ZHA integration is compatible with many different “Zigbee Coordinator” adapters from various manufacturers. Be sure to note the recommendations in the respective sections below before buying a Zigbee Coordinator.
Once ZHA has been set up with a Zigbee Coordinator it will automatically create a Zigbee network and you will be able to join/pair any Zigbee devices. With only a few limitations, most devices will join/pair directly regardless of brand and manufacturer. It is generally recommended to buy Zigbee 3.0 compliant devices if possible, though a new Zigbee Coordinator is also backward compatible with older devices. Zigbee 3.0 certified devices usually offer better interoperability. Still, not all functionality will always be supported out-of-the-box and devices that use manufacturer-specific extensions to add non-standard functions and features will need device-specific code to fully work with ZHA.
The Zigbee Coordinator will act as the central device in your Zigbee network. In the case of this ZHA integration, the Zigbee Coordinator has a microcontroller and runs the Zigbee stack which is used to manage the Zigbee network and communicate with all its devices. Its main responsibility is the joining/pairing of devices to the network and then controlling them. Being the physical network bridge interface for Zigbee, it maintains the Zigbee network topology and ensures secure and efficient communication between Zigbee devices.
Because a Zigbee relies on “mesh networking” technology it depends on its Zigbee Router devices to expand the network coverage and extend its size. These are always mains-powered devices that route messages to other devices that are located close to them within the Zigbee network mesh to improve the range and increase the total amount of devices you can add. You should therefore make sure that you have many Zigbee Router devices or else its network mesh coverage will be limited due to the short range and poor wall penetration of Zigbee radio signals.
Zigbee End Device devices will not expand the range of the network as they do not route any messages from other devices. These are usually all battery-operated devices, but not always as some Zigbee End Devices can sometimes be mains-powered devices. Always begin adding Zigbee Router devices before Zigbee End Devices when creating a new Zigbee network.
Finally, it is highly recommended that you read and follow all the general tips below about Zigbee interference avoidance and network range/coverage optimization).
PS: Another tip is to read and follow this → Guide for Zigbee interference avoidance and network range/coverage optimization