Why are computers so reliable?
Computers rely on physics. Transistors have some known characteristics, given some assumptions on making process. Parts that does not meet the exepected characteristics are just trashed (or sold with lower expectations, usually lower max frequency).

This ensure that computations are correct while complying operation conditions (stable power supply, EMC, ...). The whole systems are built to meet those requirements. When you use very cheap equipment (often a cheap power supply), you may face some computer crashes, as you do not meet system requirements (power supply stability) anymore.

Sometimes, external conditions make expectations unreachable. In aeronautic and aerospace, systems have to cope with cosmic rays that may disturb their behavior. In such case, several similar systems are used in parallel, to be able to maintain operation when one system has errors.

Also, some transmissions and storages are known to be unreliable, and Error Correction Codes are used to fix the data after reception.

So systems are designed to prevent errors to happen in almost every cases, using a broad range of dedicated methods. Working in consumer electronics, I have some failure rates on the hardware around 10 faulty parts per million in the first year of use. This is much better than the mechanical parts or the software, but not perfect (even if it's too good for the consumer market. Average return rate on consumer products is around 1%, 100 faulty parts per million would be acceptable on this market).