That makes no sense.
When Dreamweaver connects to a database it uploads files to the _mmServerScripts folder under the root and then browses to those files using the website url.
If you didn't have the root set correctly it wouldn't be able to upload the files to the correct location and wouldn't be able to retrieve database information. So I'm equally confused about how it would be able to get your database information without the root set correctly. There is definitely something odd going on.
Maybe delete and recreate the site definition from scratch. I've seen Dreamweaver sites get corrupted before and cause strange issues.