Lets say, you have to go from one city to another but you don't know how much is the distance. Can you fill you vehicle with exact quantity of fuel which will be used ?
What you would do is, keep filling the fuel as it is required on the way..
this is the idea of dynamically allocated variables. You allocate memory as it is required at run time because you don't know how much data would be coming. Sometimes it can be 100kb and sometime it could be 100mb of data. At compile time you cannot know how much memory to allocate.