This is as good an illustration as to how law firms set price as anything I’ve seen.

From the sitcom Taxi:

After burning down Louie’s apartment, Jim’s Dad write him a blank check to cover the damages. Louie must decide how much he can put on the check and have Jim’s Dad still cover the amount.