ONLY is your only defence against typos. Without ONLY, and with modules A and B both making FOO accessible, with a nod from the compiler, the poor user will be faced with a strange error message at line 3776 for mentioning FOO.
It is recognised as a Vulnerability of the language, you can google “Fortran vulnerabilities”.