When people registered new blogs using a url starting with "www" then the siteurl/home variables got screwed up. They had to edit the .htaccess to disable the redirect to do it so it didn't happen very often.
Much more common were cases where people installed using a URL starting with the "www" hostname. That did the same, screwing up URLs in the options tables.
get_blogaddress_by_id() was also broken and presumed that a URL starting with www was the main blog. I simplified the code and it works much better now!