http://www.smh.com.au/digital-life/mobiles/iphone-5s-tracks-your-movements-after-the-battery-dies-claim-20140305-346nj.html
According to Amin and other Reddit users, the powered-off tracking stems from the app's use of the iPhone 5S' M7 chip, a motion-sensor used by a range of sports-related apps, including one developed by Nike. The M7, a co-processor to the phone's main A7 chip, purely handles motion-sensor functions and requires very little power.
In this case, Amin claims it still tracked his steps even when the phone's battery was flat.