It’s not that hard to understand what it is doing and why the decision was made to make it do that. JavaScript has a particular purpose and it’s mission is not consistency.
It’s not like TypeScript doesn’t exist if you just get lightheaded at the idea of learning JavaScript’s quirks and mastering using it despite them.
Well then, rage against the machine for the next 30 years and see if they kill it in favor of a nice, strict language that everybody loves. Maybe you could suggest one here for consideration.