According to the UESP:
Only the horse that you last rode will travel with you. Horses you bought will return to where they were purchased as soon as you mount a different horse, while horses obtained as quest rewards will stay where you leave them.
See if you go back to Whiterun Stable, you can mount your horse and it will be loyal to you.
A way to fix this is to target the horse in the console, then type:
You can also try to target your player and then use
With ID being the Horse's ID.
From the UESP:
You can set the owner of the targeted item with a faction ID or a character's base ID. If you don't add the parameter, the default owner would be yourself. This can be used to remove the "stolen" tag from any items. Simply drop the item on the ground, open the console, click on the item, and enter the command. It can be difficult to select certain items. If the displayed ID code does not begin with "ff", you have not selected an item, but rather an object in the world (ground texture, light, container, etc.). Can also be used to remove the "owned" attribute of beds and gain the ownership of a stolen horse.
Why it might happen:
There is a couple of things that can go wrong here:
- The ownership has not been set properly (fix 3)
- The AI of the horse does not recognize your position (fix 1 or 2)