Restore Directory from Trashbin restores to root instead of original location

When I selected restore on a directory that had been deleted, it didn’t restore it to the original location. It restored it to root of the user directory.

How can I figure out why it did that?

It’s supposed to restore to the original location right?

You’ve not written which Nextcloud version you’re currently using. Assuming that this is a known issue, you could search the GitHub repository for trashbin related tickets. From what I’ve seen many issue tickets exist which have already been or will be fixed with one of the next versions. Check out e.g. for further details.