Tennis players are paid for WINNING TENNIS MATCHES.
Their pay has nothing to do with time on the court, the number of sets played, or the score. Winners earn money, losers do not, OR losers earn less money than a winner. At the big pro tournaments, everybody who gets in, earns something. The prize money increases, round by round, up the final.
For this 2019 Wimbledon, the Gentlemen's and Ladies' Singles Champions both got 2,350,000 British Pounds. First-round losers got 45,000 pounds. Losers in the first round of the Quallies got 7,000 pounds. As of 15 July 2019, One GB Pound = 1.25 US Dollars [approximately].