My Yorkie Arnold was always like this. I used to warn people please don't touch him he'll bite. I really have no idea why.
Luckily my two girls are both so friendly with people. Too friendly sometimes.
I don't think you'll change him. People who don't ask first deserve to be bitten.
Hugs Shirl x x