Tesla pioneered selling vehicles online. Electric cars, the pandemic, and changing consumer behavior are now causing other automakers to embrace the shift.