The coordinating conjunction "BUT" was used to connect the two phrases and introduce a comparison.
There are different types of coordinating conjunctions, they are called the "FANBOYS" (For-And-Nor-But-Or-Yet-So) each has a different use and meaning, in this case "But" is used to create a "contrast" or to make an opposition of ideas between the first part of the sentence and the second.