HIV can form resistance to antiretroviral drugs quickly because its reproduction is relatively error-prone and it can reproduce at very high rates.
Left to its own devices (i.e. untreated) HIV replicates rapidly and produces lots of mutations every time it replicates. Some of these would make it resistant to some drugs but these mutations are generally less fit than the un-mutated wild type virus, reproduce less well and either disappear or remain a tiny minority.
At the other end of the spectrum, if there is effective combination therapy and the replication of the virus is reduced to undetectable levels, it is very difficult for HIV to become resistant simply because there are relatively few opportunities to replicate and produce mutations.
The perfect conditions for HIV to develop resistance are where there is drug therapy but it is not effective enough to shut down HIV replication. These conditions occur, for example, when people are not adherent to their prescribed medications. Under these conditions there is sufficient HIV replication to produce mutations and if these render the virus resistant to one or more of the drugs being used then that mutant strain will be more successful than the wild type virus and will swiftly multiply to become the dominant strain in that patient, sometimes in a matter of weeks. This drug resistant strain can then start to undermine the immune system and cause the clinical illness associated with HIV disease.