Rivian, the Amazon-backed electric vehicle company, went public earlier this month in the biggest IPO since 2014. But before that, Detroit giants General Motors Corp. and Ford Motor Co. fought over partnering with Rivian, earning one of the legacy carmakers a multi-billion dollar payout. WSJ's Mike Colias tells the story of the high-stakes battle.