Many utility companies have a net metering policy which allows customers who generate electricity onsite to offset their excess generation with peak consumption. Think of it like a virtual battery. Any “extra” electricity generated is fed into the grid through a bi-directional meter. The energy fed into the grid is credited to your account, and you typically have 11 months to use those credits. For example, if a majority of your energy consumption is Monday-Friday, 8am-5pm, most of the energy generated by your DG system on weekends will be stored as credits for future use during peak hours, or when your DG system is undergoing maintenance or fails to meet demand.
Net metering is operated by utilities, but mandated by state legislators. The ability to net meter is usually part of a renewable energy portfolio, typically set by state DOE or a public utilities department (as applicable). The details of local net metering plans vary from state to state and country. Some localities operate under a use-it-or-lose-it model, while some pay credits (which can vary quire a bit).
Essentially, the grid is not only used as a place to send electrons, which are not stored, but is used as the peak supplier allows to operate at maximum power full-time – maximizing the value of the DG asset.