The cliche understanding is that dogs mark their territory with pee. At times I've been on walks with family and friends with half a dozen dogs. There have been occasions where they form a line just to pee in the same spot.
So how does the ownership work? Is it like a co-op? Last one to pee wins?
Not a dog scientist, but I remeber listening to an npr seqment from an actual dog scientist. I believe that cliche is a misconception. Dogs don't pee around areas to mark territory. If that were the case, they would be peeing all over your house to mark it as theirs. Rather dogs pee to leave their scent as a "Hello! Mr. Fluffy Butt was here."
It’s about communication. Territory marking works the same way (eg backyard dogs will often poop and pee on the fence line), but it’s also just like doing a check in on social media when you’re out and about.
By lifting their legs while peeing also communicates a height. Bigger the dog higher the pee. It's a way of courting and announcing their presence too. Just like bragging with photos and recent location checkins