Believe it or not, a lot of people were doing this at the time. There was a popular stunt in the 20 and 30s called wing walking that was popularized during the mid 1920s with stuntsmen such as Ormer Locklear or Tiny Broderick as well as an entire circuses dedicated to flight-related stunts like these. So this is by no means an isolated incident. Even today, people walk up on airplanes quite often. She's not even the youngest! Tiger Brewer broke the record at age 8 in 2009.
Its impossible to say for sure why exactly she did this (or was allowed to do so, for that matter), but it was actually a relatively popular stunt at the time -- comparable to tight rope walking.
Also, Wing walking itself, while still extremely dangerous, isn't as bad as it might seem at first. The wings themselves are designed specifically to be as stable as possible and cut through turbulence. This means as long as the pilot flies straight, she's got a perfectly flat surface to stand on. There's also a tarp for her to catch her footing on.