No one is loaning you money interest free. You are just paying for it in the purchase price or through other fees.
I will admit there are rare cases where strange incentives may make it cheaper or the same price to buy with credit, but these are very rare, and are only applicable if you artificially limit your available selection of vehicles to brand new. Even though you could get virtually the same car with 10k miles on it for much less.
Car dealerships have a number of incentives that can change their reserve price in strange ways. There's the advertising holdback and potential servicing cross-subsidies that sokoloff mentions, and then there are also monthly quotas and per-salesperson quotas. If the dealer is very close to their monthly quota and it's almost the end of the month, you can get a car below invoice price, because the manufacturer will give them a bonus for hitting the quota and so the marginal profit on the one car they sell you can be positive (including the bonus) even though the car itself sold at a loss. Similarly, if an individual salesperson is close to hitting their personal quota, they will let you have the car for the lowest price that won't get them in trouble with the dealer, because it helps them hit their numbers and gives them a bonus.
It's entirely possible that similar incentives exist for financing, and that's why people get zero-percent auto loans with cash back, and they're cross-subsidized by people who end up paying thousands in interest because their credit scores weren't as good or they didn't get as good a deal. But on average, the financing cost needs to be eaten by somebody, so on average you're likely to get better deals paying cash than financing. The dealer can also book all the cash immediately when you pay cash, which makes them somewhat more amenable to offer deals and opens up some other incentives for them to sell cheap (like getting rid of old model years near the end of the fiscal year and converting it to cash so their numbers look good and they can order more new model years).
(There can also be strange situations that make buying new more economical than buying used - I bought my Fit in 2009 for less than used 2007 Fits were going for, because the bottom had fallen out of the economy and oil had gone from $100/barrel to $50/barrel. The used car owners had paid ~$2000 over sticker price for a fuel-efficient car in a booming economy, while I paid ~$500 under invoice price because dealers were desperate to hit their quotas, and the dealer's beliefs about where the market is at adjusts faster than private owners' beliefs about where the market is at. Such situations are the exception rather than the rule, though.)
I think it's easier to do this for a popular car so your mileage may vary.
* Or really, without the options I don't want.
In terms of selling below their invoice price, they also get an advertising holdback that scales with cars sold, so they’re still making a small amount on the sales floor. The real money at a dealership is made in the service bays, not on the sales floor. This is what really sucks for dealers about electric cars. In 42 months, my LEAF has never seen the dealer again and I’ve only added washer fluid and changed the wiper blades once.
If you care for the batteries nicely (drive slow, don't slam accelerator, avoid winter), I'm sure they'll last a good long time, but the battery is a consumable that will need to be replaced sooner than most other major components, I think the Leaf has them under the rear seats, and may be a pain to deal with. If your Leaf has fast charging, it's advised to avoid using it too often because it will heat the batteries and may reduce charge over time.
I guess the skimping of quality here seems short-sighted, but every EV has some weird, questionable choices to cut down on weight.