Frosty sometimes does a one legged squat.
A previous family dog - kelpie x would cock her leg on things. She liked to get her pee up high. Apparently when marking - the higher the better, which is especially yukky if the dog likes to mark with poo. I know a beagle and a kelpie that do this as well as leg cocking - both boys.
I know a boy dog can be trained to never cock a leg - which can be handy - especially if you're spending a lot of time in dog competition events and you don't want the dog cocking legs on other dogs stuff. Which is the natural thing to do. Ie they will do it unless you train them not to.
Frosty didn't start marking (peeing over other pee spots) until she was about 2. Must be a more adult thing.
If your dog is humping things you don't want them to like little girls or labradors - go grab their collar and remove them and hold them until they calm down. When you let them go - if they try again, put them on lead so they can't. Ie aim to take the fun out of humping so they stop doing it. It might be a good idea to provide them with something that is ok to hump like a large washable stuffed toy.