They might seem to have almost the same effect, but that doesn't mean they're "the same."
All folders and the Desktop are a part of the application called "the Finder."
Furthermore, the Finder by default displays all mounted drives on the Desktop.
Macintosh HD is your main drive, so it is displayed on the Desktop.
And naturally, double-clicking it will open "Macintosh HD" in a new window.
Now as for the Finder icon in the Dock...
Just like any other icon in the Dock (on the left side, that is), it is representative of an application.
Clicking on it will bring to the front all windows of that application.
So if you had a bunch of Finder windows open (i.e., a bunch of folders open),
clicking on the Finder icon in the Dock will bring them all to the front.
And if no Finder window is open, then it will open a new window, which will start by default in your Home folder.
(you can change this in Finder > Preferences...)
Phew.