Rails5.1からform_withが追加されているが、これがデフォルトオプションがremote: true(つまりXMLHTTPRequestオブジェクトリクエストを送っている。ajaxでよく使うやつ。)になっている。
By default form_with attaches the data-remote attribute submitting the form via an XMLHTTPRequest in the background if an Unobtrusive JavaScript driver, like rails-ujs, is used. See the :local option for more.
ref: https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with
前バージョンまでのform_forやform_tagはデフォルトでは、上記のようになってないので、たまに「あれ!submitしてるのにページが遷移しない!!!なんでや!!!」って2〜3回なったので備忘録として残しておく。
(ちなみに、ドキュメント見たり、ググればこれ関連はたくさん出てくるが、remote: trueをオフにしたければ、local: trueオプションを追加する必要がある。)