That's not really correct, though. The batteries aren't worn out or unusable after 15-20 years... they just have maybe 15-20% less capacity than when they were new. So a battery that provided 400 miles of range, now only provides maybe 320 miles. So it becomes a question of how much range reduction the owner is willing to tolerate.
I bought a Nissan Leaf in 2011. The early model Leafs were something of an outlier because they lacked a thermal management system for their batteries and they had a very small battery, both of which caused them to suffer much more severe degradation than basically all other EV models. My 2011 now has about 70% of its original range, and that original range was only about 80 miles with a good tailwind. So now it can only go about 50 miles on a full charge. In the winter, that drops to about 40 miles... less if you use the heater.
Is the Leaf's battery so degraded as to be useless? Depends on your use case. For many use cases the Leaf's battery was too short-ranged to be useful when it was brand new. For a typical commuter, though... it was fine when it was new, and now it's marginal to insufficient unless you can charge at work.
As it happens, my son -- a college student -- still drives it daily to and from school and work. In the summer it can get him to school and work and home, without charging (he charges it from a wall outlet at his apartment). In the winter, he has to charge either at school or at work. Both have chargers (proper L2 charger at school; wall outlet at work -- but it's enough).
I wouldn't put up with that at my stage in life, but there are plenty of people who would. Heck, in college I drove a car with an unreliable starter; I always parked on an incline so I could start it by rolling and popping the clutch. This is even more true of vehicles that start with a larger range, say 300 miles, and more reasonable degradation. Your 300 mile-range car may become a 250 mile-range car over the course of 20 years of use. More likely, if you're the sort who buys a new car, you'll keep it for a few years and then sell it or pass it to someone else when it has lost only a few miles of range, but there's no reason not to expect it will stay in service for 20, even 30 years... mostly likely until it's in an accident or has other issues unrelated to the battery that aren't worth fixing.