The problem is that this often isn't physically possible.
Keyboards are rarely fully grid-like, so you have to take into account that there is a row/column shift. Modern keyboards have features like per-key RGB and hotswap sockets, which eat up a lot of valuable space. And then you also have to fit half a dozen traces in between two switches for the key matrix connectivity.
An approach like that might work for a trivial macropad, but it quickly falls apart on a full-size keyboard.
The interesting thing about scripting layout is how quickly you need an autorouter. There's usually plenty of room, but if things aren't laid out extremely regularly with no variation, it rare to be able to just write out the correct component positions and copper shapes.
It's a bit harder if you go through-hole. When you can't fit it "under" the switch footprint, it becomes harder to auto-route it-- there might not be a space specifically where you want-- maybe you want to move some diodes around to shave a couple millimetres off the PCB footprint to save a nickel, or maybe you need to rotate a switch (for example, the + and enter on the numeric pad) and end up with the 'standard' position fouling some other part of the layout.
It takes an evening or two to manually route a big battleship board, when you're not worried about RGB or having to do clever stuff with USB.
Keyboards are rarely fully grid-like, so you have to take into account that there is a row/column shift. Modern keyboards have features like per-key RGB and hotswap sockets, which eat up a lot of valuable space. And then you also have to fit half a dozen traces in between two switches for the key matrix connectivity.
An approach like that might work for a trivial macropad, but it quickly falls apart on a full-size keyboard.