The internal chemical structure of Li-ion is only designed to work for a limited number of charge/discharge cycles. As the chemistry is stressed out, the internal metals begin to form dendrites (or in more simple terms, spikes) internally.
We have reasonable estimates for how long this takes, but everyone’s battery pack is different. And the process is invisible (you have to cut open & destroy a battery to figure out how much of these dendrites or whatever have formed). So the best we got are some computers slapped on the outside of the battery pack that measures temperature, voltage, current, and time to guestimate the effects from the outside.
As cells fail, modern BMS systems will reroute power away from degenerated cells. Its not that the problem was solved per se, its that modern battery packs have a bunch of extra cells waiting in reserve to pretend that nothing has happened to the end user. But this process eventually breaks enough cells that the whole pack fails and inevitably needs replacement.
Exactly when depends on how many cells were left in reserve, how much “fast charging” you do (which is extremely harsh on the internal chemicals), the temperature of the pack under use, and any aggressive driving you might do that heats up the pack more than usual.
Its… really complex. There’s a lot of research going on right now to try to stop these dendrites from forming.
EDIT: In any case, Consumer Reports reliability surveys on various parts of say… a Toyota Prius Prime or other PHEVs. Go look at them all, see what parts fail. Its the battery.