You are missing two key differences...
1 - The price of the drivetrain. A 2.0 4 cilinder petrol engine and the 8 gear automatic transmission cost a lot of money, is much more expensive than a simple electric motor.
2 - The dealer piece of cake... around 10% of the sale value. Tesla sells...