Is it? JavaScript interpreters are crazy fast, almost comparable to compiled languages. The layout engines are powerful and efficient. They support extremely-optimized networking protocols and media formats.
It's not (currently) a great platform for high-poly 3D rendering and such, but who knows what the future holds with wasm and WebGPU.
Browsers do use a lot of memory, but so did Java, Flash, Shockwave, Silverlight, etc.