Because doing math is hard by hand and so people were thinking if they can automate mathematical operations with machines several hundred years ago. So the reason really is that math has been useful to calculate good stuff, and enabled a ton of tech, but you needed an army of people to do the math. Computers are about automating mathematical computation.
Comments