What would you use other than a random number? The memory address of the object? Well that may not be well distributed and it possibly leaks information.
I would use the memory address, if the GC is a non-moving collector. With a good hash function it should be fine. However, given most GCs are moving, including V8s, I can see why they chose the implementation they did.
Also means they can't move the object without more bookkeeping