A good e-bike battery should last for hundreds of cycles. With average use, this means several years. Eventually, electric bike batteries need to be replaced as their life cycle comes to an end.
You can tell when a battery is nearing the end of its life when it does not provide you with much range. Some high-quality batteries such as Bosch have a battery management system (BMS) integrated into the battery that actually tells you the current capacity and also how many charge cycles it has gone through...