Is it still illegal to require a warranty purchase under these circumstances?

I keep reading that requiring a warranty purchase with the car is not a legal practice. However, in my case I was buying out my lease and was told they had no incentive to sell it to me unless I purchased the Zurich VSC warranty in order for them to make any profit. Basically saying I had no choice but to buy it if I wanted to finance it there. Idk if it’s relevant, but it’s a 2021 Civic w/ 30k miles and the buyout is $13,500 which is clearly way below the price any dealer would be selling it for.

So in my case here, didn’t the dealership have the right to refuse the sale unless I agreed to this? Is this a different case compared to buying or leasing brand new, or was I lied to?