I don't think it's a perfect choice. I think it's a choice that makes it the "least bad" of a range of languages for a given set of assumptions and compromises. If I could waive a magic wand and make the perfect beginner language, it would not be JavaScript.