This is a bug being with us for a long time dating back to android version 3.x or more precisely network core or radio driver. Tons of bug reports for android 4.1, 4.2, 4.3, 4,4, 5.01 and suddenly they disappear with 5.1.1. I don't know why. The bug is more common with older Wifi radios but also new ones got problems. The bug can easily be provoked by turning on and off Wifi radio when it is already connected to an AP. It says it tries to reconnect but nothing happens. If you interrupt reconnect between tries by tapping the AP and choose connect, it will connect. This means you always need to connect manually, but not necessarily re-typing the pw. It doesn't matter what encryption you are using, WEP, WPA, WPA2, private or enterprise, with or without RADIUS server. I've been testing it for all different methods and manual connect is always needed. When I was testing this with RADIUS server and WPA2-enterprise encryption, I could monitor connect activity at RADIUS and I saw no connect activity when Android suggests it is trying.