Hi Lainey,
It's probably a mixture of excitement sometimes and at other times, more likely acknowledging his submission to whoever it is. When you have visitors, don't let them bend down to pet him. Continue the "ignore" scheme until he comes up to them.
Sometimes dogs don't have to be hit or abused to be this 'timid' with their bladders :rolleyes: It can be an individual dog or a 'stage' that he's going through. If you've ruled out a urinary infection, then just treat it as you have been.
good luck,
toodles