Well I have been wondering....if rolling pee on grass is a territorial thing, how does it make it territorial?

I understand that peeing where they walk says "I've been here so there" or "I've been here so it my walking area" but what does rolling in peed on grass do for them...How is that territorial?

Can I stop it? It makes my dog rather wiffy