If the cybercriminal succeeded in gaining a foothold in the company's network, why are the whole network and other computers infected with ransomware except the one on which he gained a foothold?
Because if you kill the computer that is giving you access to the network, you lose your doorway into that network and your control over that network.
In English, there is an expression about "cutting off the branch you're sitting on". It's the idea that you shouldn't damage the thing that is supporting you. I'm sure other languages have similar expressions.
The stated question is already answered by @schroeder.
However, if your question was actually something like "someone breaks into a computer, that is part of a network. How does that person infect every other computer in the network with ransomware" (as you suggest in your comment), then the answer is that it depends on several factors, such as the network topology, setup etc
The process of gaining access to a computer is well understood - a penetrator finds a vulnerability, exploits it and gains access. If the penetrator wants to use ransomware, then this process can be done manually (gain access to each computer and infect it with the ransomware) or in an automated way (by e.g. using a worm that will exploit vulnerabilities and deliver the ransomware as its payload).
I hope that this clarifies things, as well.