The transistor creates a (sort of) constant current source by reducing the voltage output of the LM317, which in-turn limits the initial charging current into battery to ~1/2A. Initially, the battery voltage will be less than 13.7V, so that is when the current limiter comes into play. As the battery voltage rises to near the LM317's set point of 13.7V, the charging current into the battery naturally begins decreasing, which turns off the NPN transistor, allowing the LM317's output to rise 13.7V, which is the recommended float voltage for most SLAs.