It actually doesn't move up. It always moves back, just like the back button on the browser. If you want to move "up" that is handled by the developer's UI preferences.
Android doesn't know what the correct "up" activity would even be. Unless they've changed that in 3.0, I have only used the 2.2 and 2.3 sdks.