how should the comment form really work?

If you want to redirect the user to somewhere else after they submit a comment, then all you have to do is include a hidden input in your comment form with the name of “redirect_to” and the value of the URL you want to redirect them to. The lines of code you posted show that directly. No need to hack the core code.