There are a few ways to look at this problem.
ISO as applied gain
At face value... ISO is really an application of gain which occurs after the shutter closes. (For this reason, ISO is technically not part of exposure even though most of us think of it that way and it's easier to talk about it as if it were part of exposure.) Just recognize that it is always applied after the shutter closes and it is simply an amplification or gain applied (sometimes via analog amplification or sometimes digitally by mathematically multiplying the digital information and sometimes a little of both.) But as it is always "applied gain", you can, in theory, go as far as you want.
But there are some practical reasons why you don't want to go crazy with application of gain. One big reason is because each time you increase ISO on a digital camera (and this is specific to digital cameras) you also decrease the overall dynamic range.
Digital sensors and bit-depth
I'm specifically referring to doing this in-camera because a digital camera has a given bit-depth of the pixels. In other words there is a largest numeric value that a pixels color channel can hold and if we multiply the information by values that exceed this max value ... we can't store the result.
Suppose your camera sensor has 8-bits of color depth per channel (most cameras are much more, but I'll use this example). 8-bits means that each color channel can represent 256 possible values ... where 0 is darkest and 255 is the brightest value.
Assume the camera boosts ISO only via digital gain. This means that each time you want to increase ISO by 1 full stop (1 full stop "doubles" the brightness of something) you multiply the value the camera actually recorded by 2x.
Suppose we take a photo and something in the image has a brightness value of 10 ... and something else has a brightness of 100 ... and something else has a brightness of 200 (that's the value of that specific color channel of the pixel and we have to use the term pixel colloquially to simplify how the sensor works... the truth is slightly more complicated.)
If we double the brightness by going from ISO 100 to ISO 200, then the pixel that was previously a value of 10 doubles and now has a value of 20. The pixel that was 100 now doubles and has a value of 200.
BUT... the pixel that was 200... doubles and now has a value of 400. 400 is brighter than the camera can record in 8-bit depth (maximum value is 255) ... so this pixels "clips" and is simply now just "255" instead of 400. In fact every pixel with a native value greater than 127 will now clip.
Increase the ISO again (so now we use ISO 400) and all the values are multiplied by 4x. Even more information clips.
We can raise the value of the darkest pixels safely without clipping ... but the brightest values clip. This results in a loss of dynamic range.
Camera vendors can play a few tricks ... for example do we really have to apply a linear amplification of the information. Suppose we increase the darkest pixels by 4x ... but we only increase the brightest pixels by a small fraction of that? This is a bit of a cheat to avoid clipping, but we're now losing overall contrast. No matter how we slice it or what tricks we apply, we're probably losing dynamic range.
When you think about the dynamic range problem ... the maximum that we can boost ISO is based on the number of bits. If we raise ISO by more than 8 stops on an 8-bit sensor (or more than 14 stops on a 14-bit sensor) then we effectively get the dynamic range down to nothing.
Suppose we transfer the image to a computer and apply the gain on the computer ... and the computer is using 64-bit tiff images. We can now go much farther without clipping ... but conceptually this 64-bit depth becomes the new limit.
Noise and the signal to noise ratio
One last reason why going crazy with ISO gain isn't necessarily desirable (even though you can do it) is because when you apply gain to an image, you apply gain to "everything". The values in an image file partly represent true "signal" (useful information) and also "noise" (non-useful information).
All sensors have "noise" even at base ISO. But at base ISO the noise is often so subtle that our eyes don't notice it. As you boost ISO, you increase all values (the good signal and the bad noise) and based on clipping limits, you start to degrade the signal-to-noise ratio (SNR). This is where images just look bad.
There are numerous techniques to attempt to deal with the noise problems, but it is a reality of digital photography.
In other words just because you can crank the ISO doesn't mean you'll like the results.