A Generator Allows You to Cut the Utility Power Cord.
Or another way of saying it, a Generator allows the power company to cut the cord as they please, and it won't affect your life. Many who live in rural areas know all too well what happens when an ice storm or wind hits the power grid above ground. The lines come down. Depending on the severity of the storm, a day, or a few weeks can go by before service is returned to normal operation. What are you going to do in the mean time?
Solar panels, with a bit of wind generation, require batteries, and an inverter, a built in battery charger, and appropriate fuses, breakers, and safety boxes anyway. These parts are much of the infrastructure you would require to install a generator too. So the cost of the installation of your generator will go down accordingly if done in conjunction. In a perfect world, you install the generator at the same time your solar system is installed, the electricians work together, and the install time is even reduced saving you money.
How it Works
A Generator takes the place of the power grid when the power grid fails or is unable to provide power to your home or office. Irregardless of outside influences, your solar system makes it's power as the sun shines, the wind generator run's it's blades as the wind blows making power. This power is sent to the batteries of your system to be caught in the tanks. The inverters keep taking power from the tanks, so they aren't full, and pushes that power into the utility grid under normal operation. Your system's batteries are always fully charged, and excess power is pushed back into the power grid and net metered.
When a problem arises, the power grid is no longer able to take the power you generate from solar and wind generation. If the batteries are fully charged, and the solar panels are producing, the electricity goes to ground, as it must go somewhere at the speed of light. This isn't usually a problem, as your solar panels only produce a portion of the power you use. The problem is that the batteries, or power tanks, will run dry, and the you too are out of power.
When the batteries are sufficiently drained (between 3/4 or 1/4 tank remains depending on your settings), the inverter can tell. Most grid tie inverters have another output to tell a generator to start because the battery voltages are getting too low. Baseload on an electric starter, the generator kicks on to both recharge the batteries and provide enough power for the loads. Once the batteries are full, the generator shuts down, and the loads switch back to draining the batteries. As the batteries are depleted, the cycle repeats.