It was their proximity to Harvard. Seriously.
Many Harvard grads went to MIT to teach. And some of them ran MIT, including their second president, John Daniel Runkle and their fourth president James Crafts. Harvard had a reputation for excellence for nearly 250 years when MIT was formed and whenever MIT couldn’t figure out how to do something, they could just copy the best, Harvard.