It may be a bug, but it obviously does not affect everyone. It does not happen on my older Intel iMac. And there is a +Early 2009+ Mac mini in the house, 2.0 GHz (same as and in Dah•veed's profile); it does not happen on it either.
When you did the test of setting volume low (or muted) with external speakers disconnected, and restarting with the external speakers disconnected, was the startup sound from the built-in speakers low (or muted), or was it already reset and loud. This will better determine when the volume reset takes place. If it's already loud, then it takes place during the previous logoff and actions that take place before restarting (or shutting down), or during the initial few seconds of startup (before the startup sound). If it's still low (or muted), then the sound volume reset takes place at some point after the startup sound, but before startup completes.
As another test, if you set the volume low, then log out and log back in (instead of restarting), does the volume stay low or does it get reset to the higher volume.
And as one more test, create a new admin user account in System Preferences
Accounts pane
http://docs.info.apple.com/article.html?path=Mac/10.6/en/8235.html
Log out and log in to the new account. Go to System Preferences
Accounts pane and set it for +Automatic login+ (If you don't use automatic login normally, then you don't need to set it). Now try doing the same test, except from this account instead of your normal account. Is there any difference in the volume setting being retained?