When a battery is charged or discharged, ions such as Li+ need to flow through the battery from one electrode to the other to counterbalance each electron that flows through the circuit. This is a significant amount of mass transfer that needs to be fully reversible, which is a huge ask. Basically during use, one electrode is corroding away and new material is depositing at the other end. In order for this to be reversible, the ions have to be dislodged from their new location and find their way back to where they were before. Each atom takes up space, and the materials need to accommodate atoms moving in and out repeatedly. An ideal electrode works like a sponge soaking up ions during one direction of operation and releasing them in the other. That is a huge ask.
Each electrode has a preferred state, either with or w/o ions, and will be less stable in the other state. During the less stable phase, the material will be prone to irreversible changes that reduce the overall capacity to accept ions. Maybe the material will change its bonding and lose its flexibility to accommodate the volume changes of ions moving in and out. Other times, it will find something else to react with. Most often, the metal oxide cathode is the weak point and responsible for the lifetime of most rechargeable batteries.