AOSP is Open Source. Starting from that, Google hasn't restricted anything. Going forward from there, Google (with Play, Play Services) has gradually started tightening things up because of harm to consumers. Is your Android phone running the latest security patches. No? Google needed a way to push out critical updates and their behind-the-scenes position means they have more limited control than Apple does. It obviously doesn't solve everything but I'd argue that they're doing their best to protect consumers.