A transfer switch does one job: it makes sure your house draws power from exactly one source at a time. When the grid fails, it disconnects your home from the utility before your backup source energises anything.
That disconnection is not a technicality — it is the entire safety case. Without it, a generator connected to your house can push power back out through your service and onto the utility lines outside. Those lines are what a PG&E crew will be working on, believing them dead. This is the reason a transfer switch is required rather than recommended, and the reason it is the part of a backup project that gets inspected.
It's also the piece that decides what your backup actually feels like. An automatic switch means an outage is something you notice from the lights flickering. A manual switch means going outside and throwing a lever. Both are legitimate; they cost differently and they suit different households.
This is straightforward C-10 electrical work, and it's the part of a backup system a solar or generator salesperson usually can't speak to in detail. It's also where we most often find that a panel needs attention first.