This can actually become quite a technical discussion and, since I'm not a programmer myself, I'll just briefly try to explain - and I stand corrected.
The 640 KB barrier is an architectural limitation of the original IBM PC and compatible PC's and hence why older games "only" required 640 KB of RAM, since they were written to be run on XT based PC's.
However, whereas earlier games might have been able to get away with only 64 KB or 256 KB of RAM, as technology and graphics became more advanced, later games required a bit more conventional memory (up to the 640KB RAM that was available to DOS programs).
To expand a bit on the above, games that does make use of a DOS extender, like DOS4G/W (i.e., runs in protected mode) are not limited by the 640 KB barrier.
However, games that runs in "real" mode requires a certain amount of base (conventional) memory to be free (available) in order to execute the program.
If your system's drivers and device drivers takes up too much of this conventional memory, then the application will fail to load. In some cases, certain drivers and device drivers could be loaded into the upper memory area to free up some conventional memory.
Some applications were written to make use of "expanded" memory but this must not be confused with "extended" memory, which is a totally different concept and, under DOS, required an extended memory manager in order for applications to gain access to it.
However, games that require more than 640 KB of RAM, and ran in "real mode", would normally still require a certain amount of conventional memory to be available.
In such cases, many game developers suggested making use of a boot disk before executing a game, in order to ensure that the maximum amount of conventional memory was available and that only the necessary drivers were loaded (like a mouse and/or CD-ROM driver).
Some more reading material to explain the differences between the different "types" of memory:
https://en.wikipedia.org/wiki/Conventional_memory
https://en.wikipedia.org/wiki/Extended_memory
https://en.wikipedia.org/wiki/Expanded_memory