It doesn't have to be random - you can take a many-worlds interpretation where there is a "block history" that just branches into branches with a certain "mass", and the Born probabilities are just the subjective probabilities of finding ourselves in one Everett branch or another.
The answer is to use one of the "hidden variable" interpretations of quantum mechanics. Bell's experiments have ruled out local hidden variables, but hidden variables that violate locality are still permitted. Since this function takes the global state of the universe (hidden variables included) as its input and returns a new one for its output, there is no restriction for locality, so it remains consistent. Whether its philosophically fulfilling is left as an exercise to the reader.
so, god is a bad coder with ugly global variables everywhere ? I hope the universe is more elegant than that :)
Peter Watts plays with the idea that God is malware ;)
See Anathem by Neal Stephenson :)
compiler bugs - use of uninitialized memory
It is possible that it is non-random, but we do not have the tools / insight to perceive the patterns.