tesla and thier panasonic partnership put metric crap tons of development effort in to battery and cell development. Their current cells are 4680 sized. They did start with 18650 cells, but its not like those were ancient technology in the early tesla days.
https://insideevs.com/news/587455/batteries-tesla-using-electric-cars/
Cooling systems, battery managment software, and battery construction techniques are all highly advanced and engineered systems as well.
Lots of evs use the much bigger rectangular cells as well but these are inferior in alot of ways. There is an optimal surface area to volume ratio, bigger isnt always better.