My thoughts are either he was trying to protect you as you said (most of us know our dogs better than others do.) The other possibility was him taking a alpha position to feel more secure. (This would be something a cat would be more likely to do... go to a high spot to feel more secure... but you never know. The more secure a dog feels in its role of superiority the less it will act like its station. Dogs that we can clearly see being dominant on a daily basis are NOT secure about being alpha or beta.)

I don't know your dog though... So I'd take your word that he was indeed trying to protect you.