From what I can tell you snap to the edge if you're within range when the reeling in breaks (if you're not in range you go into the jump and won't grab on until you start moving downwards), and the speed of the pull in is based on the distance between Link and an invisible box thing that starts off where it connected to the wall. When you do it while hanging directly below it's at max distance between the two so you move crazy fast (like almost a full body height per frame), and the distance between where you are last vulnerable and the edge (sweetspot distance) can end up being really large when the pull in speed is at its greatest.
Also, the invisible hookshot box thingy used to determine the speed gradually moves downward over time and closer to Link, so the longer you wait before pulling in the slower you will move. When the pull in is slower it will need to be hooked in closer to the edge to be able to snap on, since when you get above the point where it breaks you won't have gone far enough past it to be in range of the edge.
For example, if you hook in about half a body height below the edge and then pull in as soon as you are hanging directly below you'll snap on because you'll go from being below where it triggers a break to being within grab range when it breaks on the next frame. If you wait a bit before pulling in you aren't moving as fast per frame and aren't as far above the break point when you go past it, and go into the jump instead since you didn't grab on.