Phone forgetting networks after turning off wifi
I have had this problem for almost a year now. I have Nexus 5 and all the latest Android OSs. I had the exact problem, and it was really annoying. Whenever I turn of wifi or phone, it keeps forgetting my home wifi and all newly added...

Solution:


Settings > Wifi > Saved Networks


The list showed over 120 remembered networks....
I travel a lot, and it was mostly hotels, bars etc. 
So i didn't need them and I have deleted over 100 networks.


Problem was still there. When i turn off wifi again - the same. 


I repeated the step 1. There was again list of over 100 saved networks(different ones)... 


Repeat step 1 over 5 times!!!
Now I have only 20 saved networks.  And when I add new network - the device remembers it!!! 


I guess that the problem was - when you remember new network - it is there in your phone. When you turn off wifi and back on - it tries to overwrite it on your google backup account ...

However - I am happy again! This was really annoying. 

Cheers 
Marko