Dragging DT file icons to the Dock

I dragged the icon of a plain text file from the DT file list to the Dock. But when I click on the icon in the Dock, it opens the file in TextEdit, not DT. Why?

Because TextEdit is probably the default application for plain texts. In addition, it’s not a good idea to add dragged contents to the Dock - those are just temporary files and will disappear after the next log out or restart.