According to the The American Heritage Dictionary of Idioms, 2013:
crunch numbers: Perform numerous calculations or process a large
amount of numerical data. For example, Preparing John’s presentation
to the Federal Reserve Board required many hours of crunching numbers.
This term originated with the computer age and indeed still applies
mostly to the operations of computers. [Slang; second half of 1900s]
This could be related to the mechanical conception of punch cards for early computers, and the sound made by the machine while computing.
For instance, in Law Enforcement in the United States, James A. Conser, Gregory D. Russell, Terry E. Gingerich, Rebecca Paynich, Appendix 11-A, The evolution of information technology, one finds:
1943 : IBM and Howard Aiken succeeded in building the Mark I, a
machine using punched paper tape that could "crunch" numbers up to 23
digits long.
A reference to crunching also appears on the above link to H. Aiken:
he saw how fields like mathematics and even sociology were hampered by
their ability to crunch numbers—not unlike today’s push for taming Big
Data.
In
Makin' Numbers: Howard Aiken and the Computer, 1999, Cohen et al., one read that many cycles of operations could be running without visible mechanical motion,
however, even in this event the trained ear would know that the
machine was still "crunching" numbers
Apparently, crunch came around 1795-1805 as a blend of craunch and crush.