OK, I went through the code, and in install.php, line 82, it calls (PHP)extract on the array returned by the wp_install function in upgrade.php (line 51).
Here is the relevant code
>> returning the array
return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password);
>> calling extract
extract($result, EXTR_SKIP);
Note that extract is called with EXTR_SKIP which means that if the variable $password already exists, it
be overwritten by extract.
I suspect what is happening is that $password is being set to the database password by some earlier process in the installation, and when $random_password is returned by wp_install, extract is not overwriting $password with the new value.
I am going to test this theory and post back here.
BTW, can someone tell me how I can log into Trac? It's probably a better place for this kind of discussion.