I understand what you are asking and don’t necessarily disagree that this wouldn’t be handy. But hopefully this post will help you understand why it’s happening to you.
They are not returning to random places…The thralls/pets return to the last place that you set them to guard … ie the last place where you lifted them off the ground and put them back down. (yes, occasionally the game has glitch and doesn’t remember the latest guard co-ordinates but a previous guard position)
So if you do this when they are on follow you stop them from following you and reset their guard/home position. To get them to follow you again you have to chose follow. If you have reset their guard/home position then before you log off you need to use the Stand Guard command again to ensure that they stay at your base.
Hopefully the screenshots help you understand why your pets are ending up in random places:
a) put a thrall/pet on follow:
b) chose “stand guard” to lift the thrall up to move them:
c) Observe that when you put them down you get a message that the thrall/pet is no longer following you. You have NOW reset the Guard/Home position that the thrall/pet will return to when he stops following you OR you log out/crash with the thrall/pet on follow (as leaving the game also stops the thrall/pet from being on follow:
d) To get the thrall/pet to follow you again you have to select “follow” again.