It could be argued that it was part of "embrace, extend, extinguish" to attract developers to the platform by keeping it open. They would just figure out how to capitalize on anything that got big enough, much like Google.
Apple really pioneered the walled garden (which I would assume was previously taken to be shooting yourself in the foot), and it's proven to resonate with the wider less tech-savvy population.