I think you misunderstand it - the leasee only pays if they keep the car, because the residual value is (artificially) inflated. Some numbers might make it clearer:
Say you have a $25,000 ICE, with a residual value at the end of the lease of $15,000. Assume all residual values are equal to fair market value, so the leasing company sells the car for the residual. With the ICE, you "use" $10k of value during the lease. The lease payments have to total to $10k (plus interest).
Use the same numbers, but make it an EV instead. To pass along the tax credit, the leasing company needs to reduce the total lease payments (before interest) to $2500 ($25000-$15000-$7500). They can either reduce the "purchase price" at the front end to $17500, or artificially inflate the residual in the contract to $22500; both have the same net effect. It's probably easier to do the later, since the residual is a guess, anyway (and easier to explain to stockholders and accountants then "giving away" a part of the purchase price).
If the leader gives back the car, the leasing company sells at a paper loss (since fair market value for the EV is $7500 less than what was listed as the residual in the financing contract), but they already got $7500 in the tax credit, so they are made whole.
However, if the leasee keeps the car, they are obligated by the financing contract to pay the full, inflated residual negotiated when the car was originally purchased. In that case, the leasee gets screwed, and the leasing company gets an extra $7500.
Which is why you should never use a lease to finance-to-own an EV.