This is used to get the user-defined repositories. It may lead to problems though if the user doesn't have an initialised ~/.opam.
I'd advise using a command-line option, possibly using opam.ocaml.org (OpamGlobals.default_repository_address) as default.
Loading from ~/.opam could be kept as an option.