Because of JavaScript engine optimizations, especially in V8:
When both operands are known constants (like two literals), the engine can apply constant folding and dead code elimination, making both == and === extremely fast — sometimes even optimized away entirely.
The loose equality == skips the type check when both operands are already the same type, which can make it marginally faster than === in tight loops involving primitives.
However, the difference is negligible and only shows up in artificial micro-benchmarks.
In real-world usage, === is just as fast or faster, and should always be preferred unless coercion is explicitly needed.