Because UL 1741 does all the heavy lifting for you.
That's what makes it "so easy". UL 1741 is a complicated spec for "grid-tie solar inverters".
Aside from doing their usual inverter thing (itself no small matter), a 1741 inverter also senses the presence of the grid, and obviously syncs its output to the grid.
A UL 1741 inverter is intentionally designed to be unable to function without the grid giving it a heartbeat. It cannot standalone. It cannot blackstart. Why? A basic rule of using the shared power grid is you're not allowed to backfeed onto a dead grid. If you have a generator in your house, you must have a transfer switch or generator interlock that guarantees utility and generator are on opposite sides of a double-throw switch, making sure they can never connect to each other.
The reason is if there's a power failure, your generating source would energize the lines to your house, which would energize the secondary of the poletop transformer at 240V, which would energize the primary at 2400V, ditto ditto the distribution transformer at 19200V -- and suddenly downed wires, that the power company had certified as de-energized, are lit up again. Some poor lineman who is out in the rain, cold and dark getting your power back on for you, who didn't attach ground-outs because it would slow things down, becomes a sad casualty.
Because the UL 1741 inverter is designed to backfeed onto the grid, it must monitor utility power for its presence, and "follow" it. Most power plants work this way, in fact; precious few can spin up alone or "blackstart" the grid, generally hydro.
There's another factor: Rapid Shutdown. This is a required feature of rooftop solar installations, i.e. Where firemen may have to work around the solar panels with fire-axes and water. This requires the solar panels either disconnect or segment themselves so within-panel-group voltage is <80V and across-aisle voltage is <30V. Firemen need to be able to push a button to make that happen. The easiest way to implement Rapid Shutdown is at the UL 1741 inverter; have the inverter command Rapid Shutdown whenever the grid is down (or to be more precise, command Rapid startup when the grid is up :). So the fire department need only do what it already does, pull the house's main breaker / meter. So this too must go into the inverter design.
This is a real eye-opener if you expected solar power during a blackout
For that, you need a more complex system like this. Bonus points if you add a DC panelboard and supply as many household loads as possible on DC (lighting, TV, router/modem etc.)
This is a simple system with one-way power flow in all cases (except battery obviously). They make much more complicated systems designed to bolt on to existing grid-tie systems where the battery-inverter is one module with one cable connection; this makes the "don't backfeed" interlocks a lot more complicated.
Mind you, it's absolutely possible to build a UL 1741 compliant grid-tied inverter that fails over into disconnecting itself from the grid, the grid from your panel, and your panel to itself and then blackstart into your own panel to light up local appliances. But at that point you're switching 3 sides of a triangle with some pretty critical interlocked switching. And the inverter has to operate in two wildly different operating regimes; may be simpler to have 2 inverters. So this is not the unit you'll get by default when the solar salesman comes knocking.