They need some form of money to buy or service to trade for the drugs. It could be commissary items or they could "work for" the dealer as inmates do chores and other things for money.