Even Tesla has a lot of salespeople, at corporate and at the showcase stores. You just can't get a discount from them.
If someone built a car vending machine, it would only be a matter of time until someone noticed you can make sales go up at the vending machine by putting someone standing next to it.
<https://en.wikipedia.org/wiki/Saturn_Corporation>
I recall a number of stories of "automobile vending machines", and believe there may have been some early instances based out of Dubai or China, though the earliest online stories I'm finding presently are from the 2012--2014 period, about one decade ago, not two. That said, the concept surely occurred to someone prior to that.
Wired, 2014: <https://archive.ph/JkbfK>. Chinese EV rental by Kandi. Discussed on Slashdot at the time: <https://tech.slashdot.org/story/13/12/28/1630208/next-carsha...>
And an early story about Carvana from 2013, via The Car Connection: <https://www.thecarconnection.com/news/1088617_would-you-buy-...>
Google Books finds a snippet from a 1990 book, here: <https://www.google.com/books/edition/Implementing_Japanese_A...>
"Think back to the Automobile Vending Machine concept presented earlier...", in Implementing Japanese AI Techniques: Turning the Tables for a Winning Strategy by Richard Tabor Greene.
The difference is that today there are actually companies successfully following this model, Tesla being the most prominent example. All other manufacturers want to cut down on the mandatory middlemen fees (and have publicly said it - https://web.archive.org/web/20220629075106/https://www.nytim...). It's a matter of when, not if, they will get to it.