Thanks for putting up your question on Just Answer.
Root canals are blind procedures, and therefore carry a success rate of about 90-95%. What this means is, that in every 5-10 out of 100 cases, the root canal treatment fails and has to be done again.
The main reason for this is that some amount of pulp tissue that was supposed to be removed in the first attempt, gets left behind. This happens because teeth have a lot of variation in their anatomy, all of which cannot be seen on X rays.
The other reasons for your pain could be :
1. Inadequate instrumentation (some amount of pulp tissue is still left , which can be the source of pain)
2. An entire root canal missed (not picked up on an X ray and hence not cleaned)
3. A broken instrument being left inside the root canal which forms a nidus for infection leading to failure of the root canal.
4. The root canal is not filled entirely, which leads to an incomplete seal at the apex of the root, from which leakage of microbial products occurs and thus infection.
Hope this answers your question. Feel free to contact me again for more information. Please leave a positive rating for me if this answer has helped you. I do not get credit for it otherwise.
Good Luck !