The dog is protecting his property, he was doing what dogs do.
You should have waited for the owner to come back and retrieve what you needed. You were taking a risk going on their property whether you know the dog or not. they are alone and so they go into that protect mode.