Because this sentence is in a compound tense: passé composé.
The verb is:
With ne ... pas, the negative normally goes around the auxiliary, not around the past participle:
This is a very common pattern in French:
It is the passé composé, one of the main past tenses in French.
Here:
So tu as fait literally means something like you have done, but in normal English it is often translated simply as you did.
Because with avoir, the past participle usually does not agree with the subject.
So even if the subject is female, you still normally say:
The form would only change in special cases, such as when a direct object comes before the verb.
N’est-ce pas ? is a tag question. In English, it works like isn’t that so?, right?, or sometimes didn’t you?, depending on context.
Literally, it comes from is it not?, but in real French it functions as a set phrase used to ask for confirmation.
So here it softens the statement and checks that the other person agrees:
English tag questions usually match the subject and tense very closely:
French often does not work that way. Instead, it commonly uses the fixed expression n’est-ce pas ? to ask for confirmation.
So even though the main clause is about tu and a past action, French can still simply use:
Grammatically, yes, but that would not mean the same thing in tone.
N’as-tu pas fait exprès ? is a more direct question formed with inversion, and it can sound formal or literary. The original sentence, Tu n’as pas fait exprès, n’est-ce pas ?, is more like a statement plus a request for confirmation.
So the original version sounds more like: You didn’t do it on purpose, right?
rather than a straightforward question like: Didn’t you do it on purpose?