If you have the in-game preferences set to 'Auto' Tap To Move, the card will move to an available space that is legal to the game rules. However, this may not be the space you intended to move the card to.

With the latest update, you can now open the settings of the game and select an "Empty Cell Priority".

This will prioritize where the cards will move when you have an empty spot available.
Keep in mind also, that you can always drag a card to the desired location.

To adjust this setting, open the in-game settings (with the gear icon).
Use your finger to scroll down the list to find the 'Empty Cell Priority' section and set this according to your preference.
Tap Done to save your changes.