To increase your quality score, one of the main factors is relevance. Relevance is measured mostly by CTR (Click Through Rate). A higher CTR is achieved mostly by ad position, if your keyword set and ads are good. So basically, you pay more for the ad up front in order to increase your CTR which will lead to an increase in your quality score which will then lead to lower CPC (Cost Per Click). Pay more now in order to pay less later and in the long run.