What specific of car are you looking at right now?
If you trade in your car every 3–4 years, you are paying to protect the next owner. The factory warranty usually covers you for the entire time you own the vehicle.
If you’re buying a brand known for extreme reliability (like a base-model Toyota or Honda), you might spend $2,500 on a warranty and only ever use $400 in repairs.