I have a question about the Gnostic explanation for the evil in the world. If the Demiurge is responsible for this flawed creation, why would the true God create the Demiurge? If this true God is perfect, why would it allow lesser deities to emanate from it? Why does it emanate in the first place? It seems to me that the Gnostic explanation for the problem of evil comes back to the same dilemma as the other explanations.That your formulation of it comes down to the same problem is to be expected. The 'problem of evil' (aka, theodicy, justness of God) is a result of a particular theological definition of God as: all-good, all-powerful and all-knowing. Since it is a definitional problem and not a situational one, any situation in which you place that definition will result in that same problem. The reverse is also true, if you do not have that definition then you do not have that problem. Gnosticism doesn't have that theology and so doesn't have that problem.
Mythology is not theology, and the Gnostic approach is mythological rather than theological. Also, using the term "evil" invokes a larger dualistic frame that isn't necessarily any relation to the ancient thought on the subject. The Greek word is kakos, which means: bad, ugly, ill-born, unskilled, unlucky, foul, pernicious, wretched, etc. We get 'cacophony' from kako-phonos meaning "bad/ugly sound."
The explanation for endemic kakos in Valentinian Gnostic mythology is that the half-maker (demiurge) was created apart from the emanation of the ultimate divine source, and was then hidden in a fog and so was ignorant of the divine. The half-maker as a kakon (unskilled) creator then begins to create the powers (archons) and the cosmos. This story gives an explanation for the kakos (badness, ugliness, wretchedness) that is an endemic aspect of the cosmos and also the ignorance of the powers that are a part of it--it is separated from the divine and ignorant of it. This also shows the remedy, which is the reason for, point of, the myth.
The word "perfect" is another translation that invokes an anachronistic meaning frame. The two applications of telos are "without blemish," and "end, completed." In contrast, we combine and amplify the two in our use of "perfect." However, the ultimate divinity can be without blemish and still undergo a process such as emanation.
As far as the 'why' of emanations in the myth, it is also probably best understood as descriptive of the many ways in which we experience the divine (with ourselves being an aspect of such experience), and so as showing the way back to the divine. It can also be viewed as the original divine unity going through a process of realizing its different aspects through emanating (hypostasizing) those aspects.