lzyun sadly the defaul states for input/output can change because as you set the direction a mux is switched which means the pin connected is now 'different' physically so it can be in a different state. The behaviour you're seeing is just a result of how the IO works on the platform.
KurtE Yes that's a shortcut in gpiolibs, though from what I understand it doesn't work on many platforms and would still cause a 'twiddle' in the stats as is being seen here. Definately worth a shot though and we can definately add support for it. I've filed an enhacament for it. Like you say it's very easy to do . Just filed issue #80 here - Add high & low to direction enum in mraa_gpio_dir · Issue #80 · intel-iot-devkit/mraa · GitHub.