You pay that warranty on top. And it is good deal for a car that you know will require service. You can find good deals at CarMax. I found a car at CarMax $2k under the dealer. Now maybe I could’ve gotten it cheaper otherwise but I doubt much more.. also you have to realize that used cars are in demand vs new. Today it is often cheaper to buy new.
If you see a used car at the dealer, definitely negotiate it there too. Look the car up on CarFax and see if they acquired it at auction, then look up the average auction price for that year/model/trim and you'll have a good idea how much room they have to work with. Most dealerships make more money selling a used car than a new car so there's usually a healthy margin for you to take a piece of.
Source: my dad runs a dealership and I have negotiated used car prices at other dealerships.