@edgarblythe,
No, the leg-lifting isn't learned.
My current dog is the first male dog I've ever owned, and when I did research about the best time to have him neutered, I learned that the leg-cocking, and territorial marking, automatically, and innately, appear as the dog sexually matures. So, if you want to eliminate those behaviors in a male dog, you have to have him neutered before he begins displaying them, and before full sexual maturity.
So, your dog was likely neutered before he reached full sexual maturity--which is the course most owners follow--so the leg-cocking just never developed.
I was concerned about territorial marking, particularly in the house, so I had my dog neutered when he was almost 7 months old, and before he began displaying leg-cocking.
When my dog urinates, he simply extends his back legs away from his body slightly, keeping them both on the ground behind his body, and his urine stream goes straight down, directly on the ground beneath him. In other words, he continues to urine in the same position he did as a puppy.