When I read this question I realized that there's always been a story behind it in my head. As a programmer it makes sense to me, so I'll put it out there, even though I don't know if it conflicts with cannon:
Imagine you're developing a droid. You need some way of debugging it. Normally you hook it up to the development system in order to push your updates to it (It's faster than doing it wirelessly), and at the same time you can download and review the debug log. But you also want a simple, fast way to get notified of certain events when the robot is autonomous.
Now keep in mind this is a very very basic droid, a low-end model that just has very basic ship repair functions. It's something that could easily be built into the ship itself, but since it relies on an expensive AI processor to effect repairs without human assistance, it actually saves some money if it can be moved around from ship to ship as needed, and since it already has the AI, it saves time if it can wheel itself around using a rudimentary locomotion system.
So given that the droid doesn't have a speech processor, the simplest way to get debugging feedback is to have it beep. You come up with a system using different beeps to indicate different machine states. It's an great time saver! You even get creative with it, creating intonations that resonate in a human way to some of internal states, for example lower tones for when something fails, and higher ones if something works. It's actually way more efficient (and less annoying) than if the thing were to try to talk to you anyway, so it sticks. Since the things break down a lot and the beeps are fairly entertaining, most people leave the droids in debug mode even after the droid is finished and sold.
Ok, now fast forward hundreds or thousands of years later.
The droid design was hugely successful! It was so affordable and useful that it has become a staple of ship design since then, and many pilots couldn't imagine flying a ship without one. 500
Not only that, but they've become attached to the little guys. They tend to use one droid that will follow them from ship to ship. Some people even take the droids home, and find uses for them around the house. They spend so much time with these droids that they get to know the debugging beeps really well. It's sort of a rite of passage that every pilot goes through.
The design has stayed largely unchanged, but of course processors have gotten more efficient over time. The AI now has a sophistication that makes it indistinguishable from sentience. At this point the droids gain free will over a lot of their functionality, including direct control over the debugging beeps. It still allows them to express their inner state, but that inner state is much more complex now, and the fact that most of the people around them seem to understand these beeps, it also gives them a means of interacting with the world in a more complex way.
I like the idea that the purpose and complexity of the binary language slowly evolved along with the robots. It ties in with the feeling of the Star Wars universe, in which all technology feels like it's been around for a long time. People don’t even remember when the droids went from being just tools to having personality, just like our kids won't remember when phones where just for phone calls. 634