It is used to store values that can be used for multiple triggers or just for convenience.
Say, for example, you want to make the first unit that enters a region to patrol a region using multiple regions to guide it (Region 1 to Region 2 to Region 3 to Region 4 and back to Region 1, for example). However, there is no constant (like "Triggering Unit") that corresponds to "First unit that enters this region".
So what is the solution? A variable. You store the unit in a Unit variable and then order the variable to do things.
There are many other uses. You can store arrays of units so you can make your own AI, arrays of heroes to gangbang a castle, and so on.
The other use of variables is for convenience. If you have, for example, a mathematical constant that takes 5 minutes to create using the panels, you may as well put this constant as a variable and reference that every time you need it.*