I don´t understand why there is a fee is a declarative sentence.The sentence states that there is something that is not understood.
For the sentence to be exclamatory it needs an exclamation mark at the end:
I don´t understand why there is a fee is a declarative sentence !
For this sentence to be interrogative, it needs a question mark at the end and an auxiliary before the main verb: Do you understand why there is a fee?
Finally, to be imperative, it needs the imperative structure that requires no subject:
Don´t understand why there is a fee is a declarative sentence! This last is really not a probable option in normal speech.