There's a grain of truth wrapped in some bad advice here. Batteries are warrantied for a number of years or a number of full charge/discharge cycles, whichever comes first (commonly 10 years or several thousand cycles — e.g. 6,000). Every full cycle does count toward that limit, and aggressively cycling a battery to sell power to the grid will use cycles faster than just storing your own solar and load-shifting. So the underlying caution — "don't thrash the battery purely to chase export pennies" — isn't crazy.
But the framing that you should never let the battery discharge to the grid is usually overcautious. For most homeowners you won't get near the cycle limit in the warranty period through normal use, even with sensible load-shifting, because you rarely do more than roughly one full cycle a day. The real point is economic, not warranty-protection: discharging a battery to export at a low CEG rate (high-teens to low-20s cent) rarely pays, because you lose some energy to round-trip losses and you'd usually save more by keeping that stored power to offset expensive evening import. So "don't dump to the grid" is good economics far more than it's a warranty rule.
Where it gets interesting is dynamic pricing — if wholesale rates spike high enough in a given half-hour, deliberately discharging the battery to the grid (or just to your own load) during that window can be worth a cycle. The sensible rule: use the battery to power your own home and shift cheap-rate energy, treat exporting from the battery as something you do only when the price genuinely justifies the cycle, and don't worry that ordinary daily cycling will exhaust your warranty.