>There's nothing stopping HTC or Samsung from developing their own Android branch.
There isn't a hard barrier preventing Samsung et al forking Android, but there are some hurdles:
1. The Google Play app store. If you fork Android, you can't use the Google app store.
2. Google Play Services libraries. Again, you can't use these if you fork Android. They are Google's propriety code, for things like location and in-app purchases. Google have been actively persuading 3rd party app developers to use these proprietary libraries.
3. If you fork Android you can't use the Gmail Client, Google Translate, Google Calendar and Google Maps apps, amongst others. You might note that these are the very apps that Samsung has its own equivalents for - hence the apparent duplication of functionality on Galaxy devices.
4. If a hardware vendor releases a device with an Android fork, Google prohibit it from also releasing a Google Android device. i.e, hardware makers can't hedge their bets in this regard, or dip a toe in a forked pool.
The above points indicate why Samsung have duplicate apps, and why Amazon had to reach out to a obscure manufacturer for their forked Android tablets.
Android hardware makers could cooperate on making a fork, but that wouldn't give them an advantage other each other, either.