The problem is that the quantity data type uses the `decimal` data type for the scalar part, while `random` produces `number` values. When converting from `number` to `decimal`, there's no information about the precision of the number, so the extra 0.00000000000001 from floating point imprecision is kept.
I suppose that values produced by the `random` function could look at the precision of the step value, but I'd have to think more deeply about how robust that is. For now, I think you'll have to do precround.