We give Hep A primarily for travel health, and to certain occupational groups eg sewage/water plant workers, people working with hazardous waste etc.
Hep B is given for travel purposes as well as to those with occupational risk (the above plus health workers, dentists, etc) and those at social risk ie partners of IV drug users, sex workers, babies born to mums at risk of Hep B.