The intention behind the federal program was for a small number of safety-net providers to have access to affordable drugs and be able to expand their care for needy patients. But instead, the program has exploded: Now, more than half of nonprofit hospitals in the United States take part. While some providers say it has helped keep their doors open, others — especially large nonprofit health systems — have been accused of maximizing payouts and swallowing the profits.