I've been having a discussion about this recently, because the last (edit: actually last-but-one, my memory is playing tricks) gig I went to was for the support band, and the same was true for a lot of other people there. One guy joked that he was the only person there to see the headliners, and he actually only found out about the gig from those of us who were talking about the support!
I'm in two minds about it. It's happened three times now that I've gone solely for the support band, and I have always stuck around for the headliners because (a) it seems rude not to and (b) I might discover someone else good. But I always feel slightly deflated, even when the headliners turn out to be quite good. I can't immerse myself 100% in the headline set because my mind is still dwelling on the other band. And when I come out of a gig I should be buzzing with the memory of the band I just saw and singing their songs all the way home, and it's not quite the same when the memory is distanced by two hours of some other band's set.