The standard answer is that HIV is a very clever virus. But HIV also works very sloppily. This is precisely what makes it such an effective virus and so difficult to combat.
1. HIV uses your immune system against you. The virus needs your immune cells to copy itself. But you need your immune cells to fight the virus.
2. HIV hides in your DNA. The virus copies itself in your DNA, but it does so sloppily. This causes small variations and modifications to occur. As a result, there are many different versions of the virus in your body, which makes it difficult to recognise and combat HIV effectively.
3. HIV can ‘sleep’ in your body. Some immune cells where HIV is hiding go into a kind of sleep mode (become dormant). The virus remains hidden in those cells and can become active again years later, when your body tries to clear up an infection, for example.
These three factors make it difficult to completely remove HIV from the body. Of course, researchers must proceed with caution to prevent damage to the body. That is why research into a cure for HIV takes a long time.