The cells and the packs are different things. The packs aren't just a bunch of cells glued together. See this[1] fun teardown discussion. Another company building battery packs would have different costs even if they were buying the same exact cells from Panasonic, and it's likely Tesla had a hand in designing the cells so I don't know if that's particularly possible.
The reason for the Gigafactory is to compress supply chains, but more importantly because there isn't enough global demand/supply for batteries to support the volumes Tesla wants. Without building their own factory, the global supply would be a constraining factor for Tesla's plans. The Gigafactory is a long-term bet that they will need that much supply in the future. This is not a problem that other carmakers have where they would want to "vertically integrate" oil refineries and gas stations, because availability of gasoline is not a problem.
> The reason for the Gigafactory is to compress supply chains, but more importantly because there isn't enough global demand/supply for batteries to support the volumes Tesla wants.
It is mitigation for a early-adopter business risk that their competitors don't have.
In any sane pricing of their stock, that risk would have lowered its value, and mitigating it would have brought it up to that of an auto manufacturer with similar volumes and margins and growth potential.
For some reason, though, people think that mitigating a risk that their competitors don't have warrants a premium.
The reason for the Gigafactory is to compress supply chains, but more importantly because there isn't enough global demand/supply for batteries to support the volumes Tesla wants. Without building their own factory, the global supply would be a constraining factor for Tesla's plans. The Gigafactory is a long-term bet that they will need that much supply in the future. This is not a problem that other carmakers have where they would want to "vertically integrate" oil refineries and gas stations, because availability of gasoline is not a problem.
[1] https://www.youtube.com/watch?v=CpCrkO1x-Qo&t=29m30s