Complex sentence: Hacker becomes a more competent politician by the end, primarily interested in his personal career survival and advancement, but--unlike Sir Humphrey--viewing Government as a means rather than an end in itself.
Split into simpler sentences: Hacker becomes a more competent politician by the end. Though primarily interested in his personal career survival and advancement, he, unlike Sir Humphrey, views Government as a means rather than an end in itself.