Because their hardware architecture was easier to work with in the early days of electronic computing using only zeros and ones. Every modern computer has a Central Processing Unit (CPU) which performs all arithmetic calculations and also performs logical operations. The CPU is made out of millions of tiny components called transistors, which are basically switches. When the switch is ON it represents 1, and when it is OFF it represents 0. Therefore all computer programs must be ultimately translated to binary code instructions which a computer CPU can interpret and execute.