If you don’t have a battery, and your panels don’t produce enough energy for your needs, your system draws on the grid, and you pay for this electricity. Batteries give you much more control over your energy because they reduce your vulnerability to energy price hikes.
Instead of wasting your excess power, it is now stored in the solar battery system. Batteries are particularly helpful when panel output is reduced on cloudy days in the evenings, and at nighttime. When you produce more power than you need, you store the surplus in the battery and sell it back to the grid and earn a little extra cash.