Yes, Vanilla JavaScript code is pretty ugly and I completely agree with that but using library just because your code doesn't look pretty is not a good idea at all. It will cost you a lot ( 30 kb).
Remember You can make the code more readable just by breaking it into function.
I completely agree with you that people use it and it is simpler. jQuery take around 30kb and beginners most of the time don't care about this cost.
People usually use 5-10 features and ships complete jQuery which is very bad.
Actually 5-10 features in 30 kB is not bad at all.
how?
When you can do the same with Vanilla JavaScript by writing little more code.
In 2019 you need not to write very much code compared to jQuery.
Here's an AJAX call in jQuery:
And it's Vanilla JS equivalent:
To me, the jQuery version is clearly simpler and easier to read, with much less boilerplate.
And remember that the Fetch API still isn't fully supported on some browsers, so some people will still prefer AJAX.
Yes, Vanilla JavaScript code is pretty ugly and I completely agree with that but using library just because your code doesn't look pretty is not a good idea at all. It will cost you a lot ( 30 kb).
Remember You can make the code more readable just by breaking it into function.
That was just an example. There could be a bunch of these cases in the code, and besides, 30 kB isn’t all that much anyway.