Computers are physical machines, subject to the constraints of physics and electrical engineering. If you run an “infinite” loop on a real computer, the loop will eventually terminate. Given enough time the nearby power plant will stop producing the electricity that the computer runs on. The computer’s chips and circuits will degrade and fail. Electrical connections will corrode. The sun will explode and destroy the solar system. The universe may collapse into a black hole or expand into heat death. It’s certain that any physical system will eventually stop. No math is needed. Only physics and engineering.
Computer science, on the other hand, is the abstract study of computation. Computations in CS are not subject to limits of time, space, or energy. If you have a loop in a theoretical computation, you do need some higher abstract math to determine if it will go on forever or not. That’s because it has all the time, space, and energy that it needs; far more of these things than our physical universe can contain.
Computers are physical machines, subject to physical constraints. Theoretical computations in CS are abstract, not subject to physical limitations.
Of course CS does help us analyze real-world programs. But computing and computer science are literally two separate disciplines. That’s why CS majors can get a degree yet have no idea how to program. Programming is not part of CS. Programming is part of software engineering. Related but separate.