The companies pay them. Companies bid to have users increase their process' priority, or promise to pay a percentage of the earnings. Plus, most people barely use their CPU at all most of the time. If the system was secure with enforceable contracts, I don't see why this wouldn't work out.
Computers use a lot less power when they are idle. Do you think distributed computing can pay enough to cover the user's increased electricity bill plus enough of a profit to make it worthwhile for the user?