This code is from the Android Tutorial on Dragging and Scaling, but with one crucial difference: the 'ScaleFactor' local variable (sidenote - convention is to start variable names with a lower case letter) is declared as an instance/member variable mScaleFactor for the whole class in the original code (the 'm' stands for member in Android) .
The intended result is that the line:
ScaleFactor *= detector.getScaleFactor();
will accumulate the individual event scale factors into a meaningful value over the course of the gesture, whereas in your version it resets with each call to onScale(), so you only see the momentary values created by each individual scaling event.
If this is still a bit puzzling then check out a basic Java textbook for a description of the different types of variables and their scope.