There seems to be two related questions here paraphrased as :
1) How did computer science originate ?
and
2) How did "machine versus computer" become a subject of study and is it a science ?
1) Computer science developed from the specialist mathematics used to understand algorithms and machine operations. Originally a high level of mathematical understanding was correlated with programming success. More recently the narrower discipline of logical thinking has become the defining characteristic of successful computer technicians. Hardware and software aspects of computer science require different sets of engineering and scientific skills.
2) A focused study such as "machine versus computer" would draw on engineering skills as much as scientific methodology and is unlikely to be a standalone area of science.
"..unlikely to be a standalone area of science." Computer science has branched from its mathematics and science roots towards two very large and successful fields of application, engineering, i.e. software engineering, and business, i.e. information technology.
From five areas, making it a truly multidisciplinary science. The various Computer Science departments in major universities originated from Engineering, Liberal Arts and Sciences, Library Science, Mathematics, and Business Colleges. Most of these were at first focused on teaching programming, and later software engineering. As proving the reliability of software became paramount, each delved into true sciences such as computational complexity, algorithm proving, pattern recognition, information retrieval, knowledge representation and the like.
I'm now thinking more than five. Wrt liberal arts, use of computers in design of graphic arts, music/sound arts, movie arts, and art arts. Computers in medical science, urban planning, forensics, one could go on and on...
I was referring to where the academic departments historically originated. The arts came later as the silicon improved. The ACM Siggraph originated when we were moving green dots around a screen, now it is dominated by Hollywood style CGI.