If you are buying late model used, with ~36K miles or more on it, an extended warranty contract can make sense, especially if the vehicle is something like an AWD/4x4 Nissan with a CVT and lots of electronic options on it. If you're talking a Toyota, Subaru, Mazda, etc, I'd skip it.
You can negotiate the price way down. Rolling the cost into your loan, which is what the dealer wants you to do isn't the best plan because of negative equity which can come into play if you plan on trading in before the loan is paid off,
There's nothing wrong with "aftermarket" contracts provided you are buying it through a dealer network that likes working with that particular company. The mega chain dealerships in my area don't even sell/promote OEM extended warranties and haven't for years. They all use the same aftermarket one. If you go out of the dealer chain, it's a $100 co-pay. I think on average, a 5yr/100k bumper/bumper contract is $2K.
Obviously they're not the best financial move, but what is financially wise about vehicle ownership? A $2000 over 5yrs insurance policy isn't the worst thing for a vehicle w/out the best reliability track record.