Variables are needed for a variety of reasons. The first of which is that not all data within the application is static. If we need to get data from a database, and then work with that data it will be more efficient for the SQL Server and the application if we copy the value from the database into a variable, then close the database connection (which frees up the resources on the database server), then work with the value within the variable. We can then even change the value of the variable as needed, and then is required upload the new value back into the database.
Without variables software would do the same thing every time, with the same result. If that was the case why run the software more than once as the result would be the same every time.