This unfortunately happens because when viewing a document on rpubs.com, you're actually viewing a wrapper page, within which the actual document is embedded, via an iframe. So the #section-name in the browser URL bar applies to the wrapper page, not the actual document. I can't think of a way around this, other than creating a link directly to the underlying document. There are a couple of annoyances with this workaround: 1) the URL will be long and ugly, e.g. https://rstudio-pubs-static.s3.amazonaws.com/299984_fd270fd151344f7dbf406b76e001236b.html, and 2) it is a bit cumbersome to figure out the URL.
If you'd like to go this route though, you can do so by invoking your browser's View Source command (Command-Option-U on Chrome for Mac, for example) and finding "iframe" in that page--you should be able to click on the URL in that tag.