Allocatable arrays serve two purposes:
- You don't have to know the size of the array at compile time.
- You can minimise memory use.
Without allocatable arrays, you would have to select a static array size large enough to fit any possible size, which means that in most cases, you will use far more memory than necessary. And if you misjudged the possible size, you need to change the code and recompile.
Static arrays also consume their memory for the whole duration that they are in scope, so for arrays in the main program that would be the entire run time. Allocatable arrays can (and should be) deallocated if you don't need them any more in order to minimise memory use.
(Before allocatable arrays, you could use the EQUIVALENCE statement to make different variables and arrays use the same physical memory if you knew that you would never need them at the same time.)