Push those sales!
A vacuum salesman wants you to buy their vacuum. Their sole role is to push vacuum sales. They will tell you you need this new vacuum cleaner even if they don't actually know that you do. It's your job as the customer to push back and not buy one.
Let's for a moment assume that a lawyer's amount of cases and their outcome remain the same (some wins, some losses). By implementing contingency fees, this lawyer makes less money, because they don't get paid for losses anymore.
So what is a lawyer who is now making less money going to be incentivized to do? Make more money. How do they make more money? Either improve their win ratio, which they have little control over since the clients approach them, or significantly increase the amount of cases they handle.
Therefore, this lawyer will push for more cases. He'll be more inclined to urge a client to take something to court, given an acceptable ratio of win chance vs effort.
But I don't want a second job...
The basis of your question isn't inherently wrong, but it forgets external factors. We can go back to the vacuum salesman.
If their salary was not based on the amount of vacuums they sell (= court wins), but rather the amount of houses they visit (= court cases), then the vacuum salesman has no reason to tell you that you need to buy their vacuum when you don't. Instead, the vacuum salesman can just honestly ask you if you need a vacuum, and know that he will be paid regardless of whether you buy one or not.
By putting vacuum salesmen on commission, which is the same as contingency fees for a lawyer, the vacuum manufacturer put pressure on the salesmen to push as many vacuums into as many houses as they can. And while this is reasonable from a capitalist perspective, it's a frightening thought for a judiciary system that's already trying not to buckle under a heavy workload even without that extra pressure.
If you assume that a lawyer didn't need the money they were making, you'd be right. If that lawyer would make an equal amount of money doing something else (e.g. building houses) and they would just as happily do that instead, then they wouldn't mind having a few less cases, because they can just go and build more houses.
But they're sitting on an expensive law degree. Doing other work makes the degree feel like a waste. Also, just like most people, they'd rather do the one job they're good at instead of having to work multiple part-time jobs. And they can't just part-time one job, because they still need to make a living.
All of these considerations lead to the highly likely and completely human behavior of lawyers on contingency fees wanting to go to court more than lawyers who always get paid.
Slippin' Jimmy McGill
While I don't want to particularly explore this because it's a fringe notion, it does bear mentioning that such a system would also wrongly but understandably put lawyers who happen to lose many cases (through either random chance or lower skill) in a position where cutting corners or forcing a win through "other" means may become more alluring.
While that's not an excuse for any illicit behavior, nor am I claiming that there aren't already lawyers doing this; there is a reasonable argument to be made that a starving man will steal a bread when it's the only bread they can get, even if they think stealing is wrong. And if you don't want your bread to be stolen, then don't starve the man.
Essentially, you don't want to turn lawyers into Saul Goodman. Great character, horrible standard for lawyers.
Customer is king
This answer didn't focus on the optional nature of contingency fees, to keep the explanation simpler. Accounting for that became a grammatical nightmare so I skipped it.
But clients are naturally incentivized to prefer contingency fees over regular fees (assuming reasonably contingency win fees), and desirable clients tend to move around in a buyer's market, so lawyers are pressured to give the client what they want.
If a lawyer refuses contingency fees when the client wants one, and it's a buyer's market, then the lawyer does not get the client. Instead, the lawyer will only get the clients who have little to no option in terms of legal representation, and those are less desirable cases for a lawyer (because if they weren't, they'd not be struggling to find legal representation).