Yun loses programming?

I have an Arduino Yun that I can connect to my home wi-fi without difficulty. When I unplug it from the USB power (my laptop) and plug it into a 5V wall power supply, it will not reconnect to the previously set wi-fi network. When plugged back into the laptop to check, it has reset back to the default/factory settings (access point mode?).

Is this by design?

Thanks,
Samuel

This is the normal behavior if the Arduino Yun fails connecting to the network you set and it goes into access point in this case.

When you plug the board to into the wall power supply, is the Yun placed in the same position? Or did you move the Arduino into another place? Moving it after the configuration in a place where the signal strenght is low may cause connection problems and then it resets WiFi configuration.