Why are these words spelled differently? They have the same sound at the end, right?
First, they don't sound the same at the end: sauté ends with the same sound as play, clay, foray, ballet and parquet (for the last two: in their reference US pronunciation). Repartee rhymes with party and tee!
Onto the reasons: repartee comes from the French repartie (wit), which is pronunced the same (ends like party). Because it was adopted into English a long time ago (mid 17th century), its spelling has been anglicized: it evolved to match the pronunciation (think: tee).
Sauté, on the other hand, was adopted into English in the 19th century, and kept its original spelling. In French, it is pronunced with an open "e" sound at the end1. The closest common sound in English is that of play and clay, so that's how it is pronounced.
1: Apparently, the sound [e] doesn't exist outside of diphthongs in English. It is how they pronunce bed in Australia, says Wikipedia, and cake or play in some US dialects. It's used a lot in French ("é") and Italian (“va bene!”).
Because repartee is derived from the French repartie. There is no such word as repartée in French.