The idea behind an “adult cartoon” was really a new concept to North America during the 80s, 90s, and current era. In other nations such as Japan, the cartoon form is not limited to children at all, in fact there are more anime and manga targetted for adults than for children. And Family Guy is not the first adult cartoon – it was preceded by many other adult cartoons such as Harvey Birdman, Red and Stimpy and Beavis and Butthead. In fact, even some children’s cartoons have had adult jokes or concepts put in specifically for adults watching the show either on their own or with their children. Spongebob Squarepants is a great example of this, with references put in that a kid would never understand. More information about the evolution of adult cartoons can be found by researching the history of Cartoon Network’s Adult Swim channel as well as referencing the history of Williams Street, one of the major producers of eclectic adult cartoons and other adult shows that are incredibly insane (Tim and Eric’s Awesome Show, Great Job! which I highly recommend).
Continuing to your actual question, most of them are answered throughout the course of the series. Brian, for instance, came into the family via Peter adopting Brian when he was a stray dog. From the Wikipedia article: Brian was born in Austin, Texas, in a litter of 5 puppies, the other four being apparently non-anthropomorphic. The show has yet to explore his youth and adolescence in detail. He was homeless, panhandling, washing car windows on the side of a highway exit when Peter found him. Having no money to give Brian, Peter brought Brian home to the Griffin family.
Similarly, Stewie’s origins have been well explained in the direct to DVD movie Stewie Griffin: The Untold Story. I can’t remember them precisely now, but rest assured many of the character’s quirks and origins are explained throughout the series. Then again, some of them are not explained one bit, and that just adds to the comedy.
But why is Brian an anthropomorphic dog? Why is Stewie a gay football-headed baby? Because it’s what was needed for the series! Seth McFarlane obviously intends the audience to perform some amount of suspension of disbelief while watching the show. In fact, a good portion of the comedy comes from presenting these characters as regular and normal, but then challenging these concepts. For instance, many jokes are made regarding whether Stewie’s words can be heard and understood by anyone other than Brian, similarly Brian’s intimacy with women or alcoholic tendencies.