I don't understand why you have to do it.(Every sentence except this is a Complex Sentence, because there is a "relationship is when, how, and why, wherever and)
I do not understand why you do not do that (every sentence that came to see this as a relationship because Complex Sentence adverbs is when, wherever, how, and why link).
I don't understand why you have done that (every sentence quoted to this is Complex Sentence relative adverb is wherever because when,,, How, and why link) .