That must be annoying, and you have identified the correct place that should turn the feature off, which clearly isn't working. So it's not really a problem we can identify with as we are unlikely to be able to recreate it for start.
As with lots of this type of problem, there is no way we can help assist with identifying exactly why it's doing it, other than noting that it is likely transient behaviour and provide some possible steps to try and fix it, which veers us into the realm of off-topic answers as there is no way of knowing if this "answer" can solve it for you.
But with this in mind, I would try the following steps, in this order.
Wifi Off and On. If this does not solve it:
Ask to Join Networks On and Off. If this does not solve it:
Wifi Off, turn
Ask to Join Networks Off, and reboot your phone, then turn Wifi On
If none of the above solves it, I would consider connecting to iTunes, backing up your device fully, performing an OS re-install, then recovering from your backup. This is last resort, but if none of the first 3 steps fix it, it's likely that there is some corruption of the settings for your Wifi which may only be fixed by replacing with a clean setup.