There are a few spells / attacks that transform your character into another creature or object. After the duration of these spells your character will come back not riding your mount.
For example: A medusa has a spell that transform you to a statue for a short duration. When the effect is over you won't be riding your mount by default.