Tesla itself don't have to be the ones manufacturing the batteries. Given that manufacturing seems to be the part of the value chain that Tesla is the worst at, I don't think the gigafactory was ever going to be that valuable or effective anyway.
Their battery factory is Tesla's primary competitive advantage. They are far ahead of almost any other manufacturer in terms of battery chemistry (<3% cobalt [0], less lithium, etc) and battery pack manufacturing (first to do thermal management -> long battery life).