Why some viruses can spread with aerosol droplets, but others some cannot
The question you are asking, if I have it right, is about what is called the "mode of transmission" of a virus.

I won't get into too much detail but there are many many factors that play a role. The main one here (in the example of HIV vs influenza) is which cells the virus infects. Influenza infects cells of in the mouth, throat and lungs. So when it grows and ruptures these cells the virus will be let out in your throat, mouth and lungs. So the way it spreads to other people is coming out of these areas on saliva and mucus when coughed or sneezed in droplets. 

HIV on the other hand infects cells of the immune system, which are mainly found in the bloodstream as well as mucus cells (that line reproductive tracks). Again without going into too much detail (because mucoid layers are also found in the stomach etc) HIV can spread only from the location where the cells are located that it infects. Because it does not generally infect cells in the mouth and throat it will not be able to access these areas. So it spreads from blood or sexual intercourse, as that is where the cells of the immune system that it infects are located.