Corolla gets 32 mpg average. If you drive 10k miles a year, you spend about 312 gallons which is about $1000 in fuel costs give or take at regular 87 octane gas prices.
Nissan Leaf is 7$ to recharge the 40kwh pack, for a range of 140 miles. For 10k miles, you need about 71 charges, which is about $500. Thats $500 per year difference, so you need >10 years to break even for the cost of the cars. And then, if you live in an area without convenient chargers, you pay secondary non-monetary costs for planning around charging.
Insurance costs are also higher for a more expensive car.
As far as battery goes, if you look at something like an ebike battery made out of LG 18650 cells, you get an approximate cost of $10 per cell including bms and assembly. Nissan leaf has 192 cells, but the battery pack costs way more than $1920, its closer to $4k. Huge markup.
Lets hypothetically say that leaf had appropriately priced battery pack, which was $2k in stead of $4k. Thats still a $4k markup over corolla. There is no way an electric motor and controller cost an extra $4k over a ICE engine.
Like I said, novelty. You are getting scammed.