Note to Americans: In European countries this tends not to be a thing afaik. Privacy is taken more seriously, so there is no central & privatized system to query for credit. However, to rent an apartment, get a loan or get a new job here in Switzerland it's often required to provide something like a credit register extract from the local government office. That register will get notified when someone isn't paying bills, usually after the third notification ~2 months after a bill was issued (notifying the register is costing fees, so businesses try to avoid it as much as possible). After a couple of years, entries get deleted. This way there is an attempt of balancing privacy, social mobility and the interest of businesses to collect their revenue.
Where does that "free" money come from? From the payment network fees, of course. Mastercard takes a 4%-ish cut, the bank keeps 3% of that, and 2% of that goes back in my pocket. Banks have to offer such benefits because they will get cannibalized by the other players if their card can't compete.
Structurally, it's actually quite stupid that there's an invisible tax which you can only recover by playing ball with the creditors... but on an individual level you would have to be foolish to not take advantage.
My bank, and I believe most banks in the Netherlands, requires proof of stable income well above minimum wage before even considering an application for a credit card. This puts credit cards out of reach of a sizable part of the population.
Also, credit checks and reporting new lines of credit to the authorities by lenders are mandatory for all personal loans, be it for getting a mortgage, issuing a credit card, paying monthly installments for a smartphone bundled with a contract, or buying on credit from Dutch online stores or mail order catalogues.