Despite the randomness, it's more like theyre getting paid a fee to maintain ledgers than mining or creating bitcoins. Miners provide proof that theyve done work to contribute to the chain in exchange for compensation (in bitcoins), rather than making bitcoins themselves.