The tech industry is littered with once-giant megacorps that had an opportunity to pivot as technology progressed, failed to do so for this exact reason, and were usurped by startups with a better vision. In Shell’s case, the writing is already on the wall. With the emergence of EVs and renewable energy, what is the fossil fuel industry going to look like in 20-25 years? How will this decision seem justifiable retrospectively?
Fossil fuels are likely to play an enormous role in energy for at least the next 50 years. We'll almost certainly still be burning coal at that point, let alone getting rid of natural gas and liquid fuels. EVs need power and without massive transmission and distribution system upgrades if EVs achieve even 25% market saturation the physics don't work as-is. Generation is the easy part but the deeply unsexy real problem is moving that power around. Which is ironic because that problem has nearly exactly zero presence in the minds of politicians and the public. It's yet another example of what happens when complex engineering is turned into sound bites.