Same reason you use typescript. It helps you catch bugs and follow programming best practices. You also don't need typescript, but with it your code is better. Typescript is technically just a really fancy linter. The actual compilation mainly just removes the type data and does some JavaScript engine compatibility.
I try and follow best practices always too, but when the linter is catching it for you it's less to think about so you can focus on the important parts of the problem