A lot of it is temperament. A lot can be done to make a puppy tolerant of THB (typical human bull****) but once you have an older dog especially after the 2 year mark it usually becomes way harder to deal with and generally becomes a management thing.
We have a dog in board and train atm who is 7 and has bitten for people getting in his face or getting huggy and touchy with him. I haven't seen any issues from him yet because i dont do it so we get on just fine. Now at some point after i build some trust with him ill try to get him to become more tolerant of it but he will probably never be that cuddly type of dog. Its just a part of his personality now. To a certain extent i think you just have to respect that.