Using 10 integers was actually a simplification to explain what you're talking about here.
If the basic available function was rand_1_to_10(), modulo-ing its result by 3 would clearly make one result more probable than the others. The same happens with random_u64(); even though the difference is smaller, it can still be significant.
Assuming the code is black box, an outside observer would need no more than a thousand observations before they could definitely say something was off about your rand_1_to_10() mod 3 code (with 95% confidence).
But in the case of the random_u64() mod 10, you would need the heat death of the universe number of samples before that bias would be noticeably distinguishable from random.
Is there an actual example of where that specific case could be significant for anything other than maybe nation-state cryptography?
this is what has always baffled me about statistics...having the opportunity to make things exact, with little effort, it is dismissed just because the small error
That sounds related to the pigeon hole principle: if you have n objects and m buckets, and m doesn’t divide n, then some buckets have more objects than others.
random_u64() Mod 3 does indeed have a single bucket that is oversized. This overweights one option by about 5×10^-20.
rand() Itself has only 32767 possible values, so it's also common for a bucket to be overweighted depending on the number of buckets.