The big difference is that the original intended text is encoded in the URL. An element-id fragment is better than just a URL but will often be less granular than the exact text being linked (e.g. a heading).
If you're looking to link a citation to a statement, having the text is far more useful since the person following the link doesn't have to now find the statement in a potentially large and broad section. Also, if the page has since changed and the text no longer substantiates the cited claim, that'll be immediately apparent.