@jann this is true, as is the concern that LD_PRELOADing a different malloc implementation is risky, but X11 has gotten away with it for almost 20 years now. (For the twenty years before that, it was hardcoded per-platform in the Imake config files.)
I believe it's mostly an optimization to not have to use a malloc wrapper macro that does (size == 0 ? 1 : size) to the size argument everywhere, and that level of micro-optimization may be pointless now compared to 40 years ago.