You get your paternal haplogroup and a Y-DNA test and a maternal haplogroup from an MtDNA test, which show the results from your direct paternal and maternal lines, respectively. The autosomal testing reports DNA that could have been passed down to you from theoretically any of your direct ancestors, including those in the middle portion of your family tree. Your autosomal DNA could therefore have been passed down from people having a wide variety of haplogroups.
I think that some of the confusion/disappointment expressed by some of the autosomal testing customers might have been avoided had Ancestry,com chosen a more descriptive name for its autosomal testing. Too bad Family Tree DNA had already taken the name of "Family Finder."