Because then for 100 keys, you'd need 200 wires, going to 200 pins on a really big microcontroller. But that would be really wasteful, because the switches can obviously all share one common voltage (typically ground) for one terminal. So naively, you'd actually just need 100 pins on the microcontroller plus ground.
But if you put the switches in a 10x10 matrix, then you just need 10+10 = 20 pins, enabling a cheaper micro, cheaper interconnect from the membrane switches to the PCB, etc. That's the benefit, but it comes at the cost of that ghosting (unless you add extra complexity, like a diode in series with each switch). Good keyboard vendors try to lay out the matrix so important key combinations don't ghost, like any combination of modifiers, WASD, etc.