That is how indigent criminal defenders get paid.
Indigent criminal defenders make their money that way.