My galaxy s6 connects to my home wifi, but when I go out it connects to other wifi sources but when I return home it doesn't connect automatically. I have to manually connect to home wifi.
It could be the public wifi spots you use outside the home are still within range when you return home. If this is the case, manually switching may be the only option.