Coinbase makes a percentage on each purchase/sale of a cryptocurrency, much like how a bank makes money when we buy forex. As far as I know, they don't take a fee for transfers of cryptocurrencies, which is more along the lines of what Mastercard does.