1. In the last year, numerous security holes have been found in the JavaScript implementations of every major browser.
2. Even if you assume JavaScript sandboxes are secure, the actual expected behavior of the language is that all code runs in a big global scope. A perfect sandbox would prevent sites from running arbitrary code on your machine, but any JavaScript running on a page effectively has access to all the data on the page. That means every ad, tracker, etc. on the page has access to all the data on the page, including passwords on forms, etc.