It's the same reason why all the manufacturing outsourcing was so short-sighted. Sure, you're saving a few bucks on labor, but you are literally giving away all your knowledge about the manufacturing process! Those local factory workers you are firing? They won't be around to train new workers when you want to restart the local factory a decade or three later. Meanwhile, the factories overseas haven't been sitting idle either and have kept developing their manufacturing processes. They will not give you their trade secrets so you're going to have to reinvent the wheel yourself - without experts.
Congratulations, you have created your own competitor, and they are now better than you.
But these things take time and significant capital to develop, you often need to be non-competitive for years, doing things in a more expensive way, until you can catch-up. But then you can overtake everyone else, if nothing else due to the momentum of growth and the higher efficiency you had to maintain to catch-up. Just like it happened with oil in the US, or with Germany, Japan, Korea or China recovering from catastrophe.
If you don't do this, you can get cornered, where in principle you can produce a resource much more efficiently in your country, but you can't quite climb over the hill because you are addicted to depending on others as an economy and you don't anymore have the capital, know-how or culture for such things.
If the US has a ton of Lithium but finds it too expensive to extract, why not buy it now while it's cheap, wait for it to become rarer in other countries so more expensive, and only extract it once it's worth it (or close to worth it)?