It doesn't always come from mining. A huge problem with acid rock drainage (ARD) showed up when they built a freeway in Pennsylvania by merely exposing the rock.
The concept of making batteries out of drainage because both contain sulfur is like making socks out of cow manure because both contain carbon. There's so much of the latter that you could never use it all, but also the ingredient is dirt cheap in pure form.
I have a side project that could convert ARD into industrial strength sulfuric acid, which is unbelievably difficult to buy and transport, despite it being the most common industrial chemical in the world after water.