Why should we still use form element in html?
Writing unobtrusive JavaScript that works using progressive enhacement continues to be best practise because there are plenty of circumstances where JavaScript fails.
Aside from that, just because you can do something with JavaScript doesn't mean you should do something with JavaScript. Often a regular form submission will give all the desired effects with less work.
And on top of that, a form is a useful element to collect data with even if you do use JavaScript. For example, you can use a form element to populate a FormData
element.
Forms provide semantic data to group form controls, this is heavily used by screen readers.
As mentioned in comments, some password managers use them to identify grouped login form controls.
one reason is if, for any reason, javascript is disabled / not allowed but an application still should work.
It is also quite easy to make forms and send them via post/get in html. For me, it is sometimes a pain to do it in another language.