The first thing to note is that when HIV is inside the body it infects the cells that are part of the immune system, particularly the “Helper T-cells” (Helper T-cells are complex cells but simply explained, they coordinate the immune response).
Second, HIV is a particular type of virus called a retrovirus, a retrovirus integrates its own genome into the DNA of the host cell. The way HIV does this, is to write its own genetic code into the DNA of infected Helper T-Cells so when the T-Cell naturally replicates to make more Helper T-cells, it’s daughter cells will also carry the HIV DNA inside.
Finally and unfortunately, by hiding in the DNA of the Helper T-cells, HIV can lie dormant (i.e. not making more copies of itself) and undetected for years. If the virus does not replicate inside these cells, neither the immune system nor the current HIV treatment can are able to detect the Helper T cells with HIV DNA inside them.
Thus, even if the treatment controls all replicating virus (i.e. virus that is making more copies of itself inside infected cells), the virus DNA lying dormant will not be eliminated. At any point, an infected Helper T Cell could reactive and start spreading the HIV virus again. Thus, people need to be on treatment continuously, so that if a dormant HIV reactivates, it can be immediately controlled by the treatment.
All this makes it extremely difficult to “cure” HIV as a SINGLE Helper T-cell with HIV DNA can reactive the virus.