What is the significance of the "$SPARK_HOME" environment variable in Spark? Why is it necessary to set it?