You sure that it stores that or does it just store the fact that the flashlight was on in some log somewhere on the device. I could see the usage statistics of pretty much anything being stored in /var/log/<app access log> and then cross referenced with the location information that the phone already stores. The likely just correlated the two... in fact the location information is likely on no mater what and they could have used that anyway.