They aren’t needed in fossil fuel based cars either if you have an engine for each drive wheel. But most electric cars still employ a differential on one or more axles, even Tesla. Typically, due to cost, packaging, or performance, you have more drive wheels than motors and a differential is necessary.