Designing an electric car has a lot of different design tradeoffs than a gas car, so cars that are designed from the ground up as electric are going to perform better than gas cars that are electrified.
The biggest two factors are that the battery is large and heavy, but is flexible in the shape it assumes. For good handling, you'd like to have this weight as low on the car as possible, and close to the center. The almost universally accepted solution is the skateboard design, where the batteries sit under the passengers, spread out over a large area.
The electric motors are also small and you can do away with a lot of systems like the transmission, exhaust, starter motor, alternator, gas tank, various pumps, pollution controls, etc. This means much less need for under hood space.
Once you take these factors into account, the designs of various EVs make a lot of sense.