As far as I understand, in thermodynamics an isothermal process is a process (a state change) during which the temperature of the system remains constant.
If I consider an ideal gas, the work obtained from (or put into) the system during an isothermal expansion (or compression) from volume $V_1$ to volume $V_2$ is $W = n R T \ln \frac{V_2}{V_1}$.
Considering this equation alone, I'm puzzled, as $\ln$ as a function is unbounded. This equation alone means that by letting my gas expand to arbitrarily large volume, I can get out arbitrarily large amounts of work. As this obviously cannot be the case, there must be something that forbids the assumption of expansion to arbitrarily large volume. What is this something?
Please understand I see there would be technical obstacles (e. g. how would you build a machine that can handle arbitrarily large volumes?) but I am not interested in these. I'm asking for a theoretical reason that restricts expansion, or a characterisation of the set of possible isothermal processes of a system (an ideal gas) in a given state.