Ben Burtt, legendary sound designer of the Star Wars films, talks about creating Chewbacca's voice in this vintage interview.
The first voice that Burtt worked on in Star Wars was Chewbacca's, but in the script, there was little direction as to what a Wookiee would sound like. It had to be alien and an intelligent language, but not recognizable.
In one of Burtt's first meetings with George Lucas, the director suggested that bears might be suitable. For a year, Burtt collected the grunts and roars of bears, along with the sounds of walruses, lions, and many other animals. By extracting little bits from each recording, Burtt could identify sounds based on emotions -- anger, affection, etc. He cut those together in a way that could match how the character's mouth moved, as well as convey feelings and language. The resulting mix formed the basis of Chewbacca's iconic voice.