Some early computers did essentially that...
Your circuit is a decent start to making computer logic, but it has a problem. The output is an electrical signal, but the input is mechanical. If you want to cascade the output to another level of logic, the input also has to be electrical.
You can move a switch with an electromagnet; this is called a relay. Now you can nest your logic as deep as you need! Some pioneering computers were built from relays:
- Konrad Zuse built a series of relay computers in World War II Germany. The Z2 had a mechanical memory, but the rest of the computer was made of relays. The Z3 performed floating-point calculations. The Z4 was the first all-electric computer.
- The Bletchley Park Bombe, famously designed by Alan Turing, was able to decrypt the Enigma code used by Germany during World War II.
- The Harvard Mark I was built by John Von Neumann, and contributed to the Manhattan Project. Von Neumann built two more models that were also relay-based.
- Bell Telephone created the Model V computer in 1946.
- One of IBM's first calculating devices was the IBM CPC in 1949.
(By the way, there is nothing special about using an LED as your output. Relay computers often used regular light bulbs as output devices. Although some early logic used diodes, it's simply not needed.)
...but they were slow...
It takes time to physically flip a switch, even if it is done electromagnetically. So relay computers were slow. They were outpaced by and lost market to computers built from vacuum tubes, which could switch at the speed of light.
...and unreliable.
When you flip a switch millions of times, it is bound to eventually break. Relays tended to jam.
Vacuum tubes also had reliability issues: they eventually burn out. However, it's a lot easier to spot a tube that is no longer glowing than finding a stuck relay. That's important when you are trying to track down which of the thousands of relays/tubes is making your computer malfunction.
Eventually, computers moved on to discrete transistors, then integrated circuits, each with better speed and reliability.