If you read the article you will see that they do it most likely cheaper than the prison can do:
JPay’s rapid rise stems in part from the generous deal it offers many prison systems. They pay nothing to have JPay take over handling financial transfers. And for every payment it accepts in these states — prisoners typically receive about one per month — the company sends between 50 cents and $2.50 back to the prison operator.
The government does have the power, and they most likely are outsourcing this part of their non core infrastructure like most other companies do, to save money.
The government is the entity with power here. The government regularly dictates all kinds of terms for their contracts. All the time.