Excellent explanation - I'd also like to add ...
Eons ago when we were designing our first LiIon packs for our solar car, I installed a few test instruments (spec analyser, dso, imp analyser etc) in the vehicle, and ran it around our test track under various conditions. The idea was to find out "real world" answers.
First observation (without any filtering) - even with the most efficient motor controller / wheel motor - there was 40V+ of full range spectral noise sitting on the pack, and far worse under regen braking. No battery can put up with this type of "noise". They are usually only good to ~ a few hundred Hz, depending on chemistry. As mentioned - it degrades the battery life.
Then we started adding capacitors - bulk low ESR, RF, ceramics etc etc. These definitely made a HUGE difference, BUT up to low 10s of 1,000s uF etc, even they overheated and often were destroyed. I have video somewhere of some spectacular results :-)
- and this is just on a car weighing 180Kg and running 98.5% efficiency .. things get way more serious on RW EVs. That's why the cap banks are quite large - it's not like just adding a filter cap and that'll do. CAP banks can be in order of many Farads.
Also - IF you have regen, batteries HATE regen, they can't take the inrush currents. On MANY EVs, that don't have cap banks, regen % of what they are capable of is serious restricted, based on what the battery can handle. A waste in a way, but better something than nothing.